]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/shared/video-details.model.ts
Rename Pod -> Server
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / shared / video-details.model.ts
index 3a6ecc480449ea0c4e585ba8f6b7a587c16c96f5..64cb4f847fb528c8efaa1451537eced15cebc2df 100644 (file)
@@ -5,11 +5,12 @@ import {
   VideoFile,
   VideoChannel,
   VideoResolution,
-  UserRight
+  UserRight,
+  VideoPrivacy
 } from '../../../../../shared'
 
 export class VideoDetails extends Video implements VideoDetailsServerModel {
-  author: string
+  account: string
   by: string
   createdAt: Date
   updatedAt: Date
@@ -26,7 +27,7 @@ export class VideoDetails extends Video implements VideoDetailsServerModel {
   uuid: string
   isLocal: boolean
   name: string
-  podHost: string
+  serverHost: string
   tags: string[]
   thumbnailPath: string
   thumbnailUrl: string
@@ -38,12 +39,18 @@ export class VideoDetails extends Video implements VideoDetailsServerModel {
   likes: number
   dislikes: number
   nsfw: boolean
+  descriptionPath: string
   files: VideoFile[]
   channel: VideoChannel
+  privacy: VideoPrivacy
+  privacyLabel: string
 
   constructor (hash: VideoDetailsServerModel) {
     super(hash)
 
+    this.privacy = hash.privacy
+    this.privacyLabel = hash.privacyLabel
+    this.descriptionPath = hash.descriptionPath
     this.files = hash.files
     this.channel = hash.channel
   }
@@ -64,7 +71,7 @@ export class VideoDetails extends Video implements VideoDetailsServerModel {
   }
 
   isRemovableBy (user: AuthUser) {
-    return user && this.isLocal === true && (this.author === user.username || user.hasRight(UserRight.REMOVE_ANY_VIDEO))
+    return user && this.isLocal === true && (this.account === user.username || user.hasRight(UserRight.REMOVE_ANY_VIDEO))
   }
 
   isBlackistableBy (user: AuthUser) {
@@ -72,6 +79,6 @@ export class VideoDetails extends Video implements VideoDetailsServerModel {
   }
 
   isUpdatableBy (user: AuthUser) {
-    return user && this.isLocal === true && user.username === this.author
+    return user && this.isLocal === true && user.username === this.account
   }
 }