aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main/video
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-main/video')
-rw-r--r--client/src/app/shared/shared-main/video/video.model.ts15
1 files changed, 13 insertions, 2 deletions
diff --git a/client/src/app/shared/shared-main/video/video.model.ts b/client/src/app/shared/shared-main/video/video.model.ts
index ab8ed9051..f0a4a3f37 100644
--- a/client/src/app/shared/shared-main/video/video.model.ts
+++ b/client/src/app/shared/shared-main/video/video.model.ts
@@ -26,12 +26,18 @@ export class Video implements VideoServerModel {
26 licence: VideoConstant<number> 26 licence: VideoConstant<number>
27 language: VideoConstant<string> 27 language: VideoConstant<string>
28 privacy: VideoConstant<VideoPrivacy> 28 privacy: VideoConstant<VideoPrivacy>
29
29 description: string 30 description: string
31
30 duration: number 32 duration: number
31 durationLabel: string 33 durationLabel: string
34
32 id: number 35 id: number
33 uuid: string 36 uuid: string
37 shortUUID: string
38
34 isLocal: boolean 39 isLocal: boolean
40
35 name: string 41 name: string
36 serverHost: string 42 serverHost: string
37 thumbnailPath: string 43 thumbnailPath: string
@@ -85,8 +91,12 @@ export class Video implements VideoServerModel {
85 91
86 pluginData?: any 92 pluginData?: any
87 93
88 static buildClientUrl (videoUUID: string) { 94 static buildWatchUrl (video: Partial<Pick<Video, 'uuid' | 'shortUUID'>>) {
89 return '/w/' + videoUUID 95 return '/w/' + (video.shortUUID || video.uuid)
96 }
97
98 static buildUpdateUrl (video: Pick<Video, 'uuid'>) {
99 return '/videos/update/' + video.uuid
90 } 100 }
91 101
92 constructor (hash: VideoServerModel, translations = {}) { 102 constructor (hash: VideoServerModel, translations = {}) {
@@ -109,6 +119,7 @@ export class Video implements VideoServerModel {
109 119
110 this.id = hash.id 120 this.id = hash.id
111 this.uuid = hash.uuid 121 this.uuid = hash.uuid
122 this.shortUUID = hash.shortUUID
112 123
113 this.isLocal = hash.isLocal 124 this.isLocal = hash.isLocal
114 this.name = hash.name 125 this.name = hash.name