X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fvideos%2Fshared%2Fvideo-details.model.ts;h=64cb4f847fb528c8efaa1451537eced15cebc2df;hb=608624252466acf9f1d9ee1c1170bd4fe4d18d18;hp=3a6ecc480449ea0c4e585ba8f6b7a587c16c96f5;hpb=954605a804da399317ca62afa2fb9244afa11ebf;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/videos/shared/video-details.model.ts b/client/src/app/videos/shared/video-details.model.ts index 3a6ecc480..64cb4f847 100644 --- a/client/src/app/videos/shared/video-details.model.ts +++ b/client/src/app/videos/shared/video-details.model.ts @@ -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 } }