X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-main%2Fvideo%2Fvideo.model.ts;h=b11316471fe0772d3e05edcbfebfdea712c294ca;hb=3c10840fa90fc88fc98e8169faf4745ff6c80893;hp=b7720c8d21da3617869c159a391f2d1be60a5f6a;hpb=9e8789497377cac5554a622da605f5b89587aa9c;p=github%2FChocobozzz%2FPeerTube.git 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 b7720c8d2..b11316471 100644 --- a/client/src/app/shared/shared-main/video/video.model.ts +++ b/client/src/app/shared/shared-main/video/video.model.ts @@ -10,9 +10,11 @@ import { UserRight, Video as VideoServerModel, VideoConstant, + VideoFile, VideoPrivacy, VideoScheduleUpdate, - VideoState + VideoState, + VideoStreamingPlaylist } from '@shared/models' export class Video implements VideoServerModel { @@ -52,7 +54,7 @@ export class Video implements VideoServerModel { embedPath: string embedUrl: string - url?: string + url: string views: number likes: number @@ -65,8 +67,12 @@ export class Video implements VideoServerModel { waitTranscoding?: boolean state?: VideoConstant scheduledUpdate?: VideoScheduleUpdate + blacklisted?: boolean - blockedReason?: string + blacklistedReason?: string + + blockedOwner?: boolean + blockedServer?: boolean account: { id: number @@ -92,6 +98,9 @@ export class Video implements VideoServerModel { pluginData?: any + streamingPlaylists?: VideoStreamingPlaylist[] + files?: VideoFile[] + static buildWatchUrl (video: Partial>) { return buildVideoWatchPath({ shortUUID: video.shortUUID || video.uuid }) } @@ -100,7 +109,7 @@ export class Video implements VideoServerModel { return '/videos/update/' + video.uuid } - constructor (hash: VideoServerModel, translations = {}) { + constructor (hash: VideoServerModel, translations: { [ id: string ]: string } = {}) { const absoluteAPIUrl = getAbsoluteAPIUrl() this.createdAt = new Date(hash.createdAt.toString()) @@ -163,7 +172,13 @@ export class Video implements VideoServerModel { if (this.state) this.state.label = peertubeTranslate(this.state.label, translations) this.blacklisted = hash.blacklisted - this.blockedReason = hash.blacklistedReason + this.blacklistedReason = hash.blacklistedReason + + this.blockedOwner = hash.blockedOwner + this.blockedServer = hash.blockedServer + + this.streamingPlaylists = hash.streamingPlaylists + this.files = hash.files this.userHistory = hash.userHistory