diff options
Diffstat (limited to 'client/src/app/shared/shared-video-playlist/video-playlist.model.ts')
-rw-r--r-- | client/src/app/shared/shared-video-playlist/video-playlist.model.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/client/src/app/shared/shared-video-playlist/video-playlist.model.ts b/client/src/app/shared/shared-video-playlist/video-playlist.model.ts index d67f372f4..d96b70922 100644 --- a/client/src/app/shared/shared-video-playlist/video-playlist.model.ts +++ b/client/src/app/shared/shared-video-playlist/video-playlist.model.ts | |||
@@ -13,6 +13,8 @@ import { | |||
13 | export class VideoPlaylist implements ServerVideoPlaylist { | 13 | export class VideoPlaylist implements ServerVideoPlaylist { |
14 | id: number | 14 | id: number |
15 | uuid: string | 15 | uuid: string |
16 | shortUUID: string | ||
17 | |||
16 | isLocal: boolean | 18 | isLocal: boolean |
17 | 19 | ||
18 | url: string | 20 | url: string |
@@ -41,11 +43,17 @@ export class VideoPlaylist implements ServerVideoPlaylist { | |||
41 | 43 | ||
42 | videoChannelBy?: string | 44 | videoChannelBy?: string |
43 | 45 | ||
46 | static buildWatchUrl (playlist: Pick<VideoPlaylist, 'uuid' | 'shortUUID'>) { | ||
47 | return '/w/p/' + (playlist.uuid || playlist.shortUUID) | ||
48 | } | ||
49 | |||
44 | constructor (hash: ServerVideoPlaylist, translations: {}) { | 50 | constructor (hash: ServerVideoPlaylist, translations: {}) { |
45 | const absoluteAPIUrl = getAbsoluteAPIUrl() | 51 | const absoluteAPIUrl = getAbsoluteAPIUrl() |
46 | 52 | ||
47 | this.id = hash.id | 53 | this.id = hash.id |
48 | this.uuid = hash.uuid | 54 | this.uuid = hash.uuid |
55 | this.shortUUID = hash.shortUUID | ||
56 | |||
49 | this.url = hash.url | 57 | this.url = hash.url |
50 | this.isLocal = hash.isLocal | 58 | this.isLocal = hash.isLocal |
51 | 59 | ||