aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video/video.model.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/video/video.model.ts')
-rw-r--r--client/src/app/shared/video/video.model.ts9
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) {