X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fmodels%2Fvideos%2Fvideo.model.ts;h=f88f381cb8d52af06f6e7d23c07867ca2af30845;hb=34b19192901b0f872c72ce8d94a69aeba51d1c29;hp=70132c050988f2b13b6e97dd00fd9a7b07f4986d;hpb=2243730c8edf210c0a3ffc161bac89785f6a52f0;p=github%2FChocobozzz%2FPeerTube.git diff --git a/shared/models/videos/video.model.ts b/shared/models/videos/video.model.ts index 70132c050..f88f381cb 100644 --- a/shared/models/videos/video.model.ts +++ b/shared/models/videos/video.model.ts @@ -1,11 +1,12 @@ -import { VideoResolution } from '../../index' +import { VideoResolution, VideoState } from '../../index' import { Account } from '../actors' import { Avatar } from '../avatars/avatar.model' import { VideoChannel } from './video-channel.model' import { VideoPrivacy } from './video-privacy.enum' +import { VideoScheduleUpdate } from './video-schedule-update.model' export interface VideoConstant { - id: number + id: T label: string } @@ -14,7 +15,9 @@ export interface VideoFile { resolution: VideoConstant size: number // Bytes torrentUrl: string + torrentDownloadUrl: string fileUrl: string + fileDownloadUrl: string } export interface Video { @@ -25,7 +28,7 @@ export interface Video { publishedAt: Date | string category: VideoConstant licence: VideoConstant - language: VideoConstant + language: VideoConstant privacy: VideoConstant description: string duration: number @@ -39,7 +42,23 @@ export interface Video { dislikes: number nsfw: boolean + waitTranscoding?: boolean + state?: VideoConstant + scheduledUpdate?: VideoScheduleUpdate + account: { + id: number + uuid: string + name: string + displayName: string + url: string + host: string + avatar: Avatar + } + + channel: { + id: number + uuid: string name: string displayName: string url: string @@ -56,4 +75,8 @@ export interface VideoDetails extends Video { files: VideoFile[] account: Account commentsEnabled: boolean + + // Not optional in details (unlike in Video) + waitTranscoding: boolean + state: VideoConstant }