X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fmodels%2Fvideos%2Fvideo.model.ts;h=b47ab1ab8c1e0a0a7ff9e3da413fe55f82701adf;hb=2d3741d6d92e9bd1f41694c7442a6d1da434e1f2;hp=70132c050988f2b13b6e97dd00fd9a7b07f4986d;hpb=0db1a226507a39b0a663e3e63f04851836a44d5a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/shared/models/videos/video.model.ts b/shared/models/videos/video.model.ts index 70132c050..b47ab1ab8 100644 --- a/shared/models/videos/video.model.ts +++ b/shared/models/videos/video.model.ts @@ -1,20 +1,40 @@ -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 { VideoChannel } from './channel/video-channel.model' import { VideoPrivacy } from './video-privacy.enum' - -export interface VideoConstant { - id: number - label: string -} +import { VideoScheduleUpdate } from './video-schedule-update.model' +import { VideoConstant } from './video-constant.model' export interface VideoFile { magnetUri: string resolution: VideoConstant size: number // Bytes torrentUrl: string + torrentDownloadUrl: string fileUrl: string + fileDownloadUrl: string + fps: number +} + +export interface VideoChannelAttribute { + id: number + uuid: string + name: string + displayName: string + url: string + host: string + avatar: Avatar +} + +export interface AccountAttribute { + id: number + uuid: string + name: string + displayName: string + url: string + host: string + avatar: Avatar } export interface Video { @@ -25,7 +45,7 @@ export interface Video { publishedAt: Date | string category: VideoConstant licence: VideoConstant - language: VideoConstant + language: VideoConstant privacy: VideoConstant description: string duration: number @@ -39,13 +59,15 @@ export interface Video { dislikes: number nsfw: boolean - account: { - name: string - displayName: string - url: string - host: string - avatar: Avatar - } + waitTranscoding?: boolean + state?: VideoConstant + scheduledUpdate?: VideoScheduleUpdate + + blacklisted?: boolean + blacklistedReason?: string + + account: AccountAttribute + channel: VideoChannelAttribute } export interface VideoDetails extends Video { @@ -56,4 +78,8 @@ export interface VideoDetails extends Video { files: VideoFile[] account: Account commentsEnabled: boolean + + // Not optional in details (unlike in Video) + waitTranscoding: boolean + state: VideoConstant }