import { getAbsoluteAPIUrl, getAbsoluteEmbedUrl } from '@app/helpers'
import { Actor } from '@app/shared/shared-main'
+import { buildPlaylistWatchPath } from '@shared/core-utils'
import { peertubeTranslate } from '@shared/core-utils/i18n'
import {
AccountSummary,
export class VideoPlaylist implements ServerVideoPlaylist {
id: number
uuid: string
+ shortUUID: string
+
isLocal: boolean
url: string
videoChannelBy?: string
+ static buildWatchUrl (playlist: Pick<VideoPlaylist, 'uuid' | 'shortUUID'>) {
+ return buildPlaylistWatchPath({ shortUUID: playlist.shortUUID || playlist.uuid })
+ }
+
constructor (hash: ServerVideoPlaylist, translations: {}) {
const absoluteAPIUrl = getAbsoluteAPIUrl()
this.id = hash.id
this.uuid = hash.uuid
+ this.shortUUID = hash.shortUUID
+
this.url = hash.url
this.isLocal = hash.isLocal