diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-14 09:08:47 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-14 09:27:18 +0200 |
commit | 191764f30b0a812bf3a9dbdc7daf1d5afe25e12a (patch) | |
tree | a5592f8d89949cde832f025e393a3821ad2aca37 /client/src/app/shared/video/video.model.ts | |
parent | 26b7305a232e547709f433a6edf700bf495935d8 (diff) | |
download | PeerTube-191764f30b0a812bf3a9dbdc7daf1d5afe25e12a.tar.gz PeerTube-191764f30b0a812bf3a9dbdc7daf1d5afe25e12a.tar.zst PeerTube-191764f30b0a812bf3a9dbdc7daf1d5afe25e12a.zip |
Improve blacklist management
Diffstat (limited to 'client/src/app/shared/video/video.model.ts')
-rw-r--r-- | client/src/app/shared/video/video.model.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/client/src/app/shared/video/video.model.ts b/client/src/app/shared/video/video.model.ts index 6b1a299ea..ec0afcccb 100644 --- a/client/src/app/shared/video/video.model.ts +++ b/client/src/app/shared/video/video.model.ts | |||
@@ -41,6 +41,8 @@ export class Video implements VideoServerModel { | |||
41 | waitTranscoding?: boolean | 41 | waitTranscoding?: boolean |
42 | state?: VideoConstant<VideoState> | 42 | state?: VideoConstant<VideoState> |
43 | scheduledUpdate?: VideoScheduleUpdate | 43 | scheduledUpdate?: VideoScheduleUpdate |
44 | blacklisted?: boolean | ||
45 | blacklistedReason?: string | ||
44 | 46 | ||
45 | account: { | 47 | account: { |
46 | id: number | 48 | id: number |
@@ -62,6 +64,10 @@ export class Video implements VideoServerModel { | |||
62 | avatar: Avatar | 64 | avatar: Avatar |
63 | } | 65 | } |
64 | 66 | ||
67 | static buildClientUrl (videoUUID: string) { | ||
68 | return '/videos/watch/' + videoUUID | ||
69 | } | ||
70 | |||
65 | private static createDurationString (duration: number) { | 71 | private static createDurationString (duration: number) { |
66 | const hours = Math.floor(duration / 3600) | 72 | const hours = Math.floor(duration / 3600) |
67 | const minutes = Math.floor((duration % 3600) / 60) | 73 | const minutes = Math.floor((duration % 3600) / 60) |
@@ -116,6 +122,9 @@ export class Video implements VideoServerModel { | |||
116 | 122 | ||
117 | this.scheduledUpdate = hash.scheduledUpdate | 123 | this.scheduledUpdate = hash.scheduledUpdate |
118 | if (this.state) this.state.label = peertubeTranslate(this.state.label, translations) | 124 | if (this.state) this.state.label = peertubeTranslate(this.state.label, translations) |
125 | |||
126 | this.blacklisted = hash.blacklisted | ||
127 | this.blacklistedReason = hash.blacklistedReason | ||
119 | } | 128 | } |
120 | 129 | ||
121 | isVideoNSFWForUser (user: User, serverConfig: ServerConfig) { | 130 | isVideoNSFWForUser (user: User, serverConfig: ServerConfig) { |