X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fmodels%2Fvideos%2Fvideo.model.ts;h=06ffb327c747c5ec5deafe4da546d54426396c01;hb=f713f36bdf6f696ab0fe8a309035a09e864a48ca;hp=a69152759aa0e77d43de607bf0a81ed02b2f1d48;hpb=610d0be13b3d01f653ef269271dd667a57c85ef2;p=github%2FChocobozzz%2FPeerTube.git diff --git a/shared/models/videos/video.model.ts b/shared/models/videos/video.model.ts index a69152759..06ffb327c 100644 --- a/shared/models/videos/video.model.ts +++ b/shared/models/videos/video.model.ts @@ -1,15 +1,17 @@ -import { AccountSummary, VideoChannelSummary, VideoState } from '../../index' -import { Account } from '../actors' -import { VideoChannel } from './channel/video-channel.model' +import { Account, AccountSummary } from '../actors' +import { VideoChannel, VideoChannelSummary } from './channel/video-channel.model' +import { VideoFile } from './file' +import { VideoConstant } from './video-constant.model' import { VideoPrivacy } from './video-privacy.enum' import { VideoScheduleUpdate } from './video-schedule-update.model' -import { VideoConstant } from './video-constant.model' +import { VideoState } from './video-state.enum' import { VideoStreamingPlaylist } from './video-streaming-playlist.model' -import { VideoFile } from './video-file.model' export interface Video { id: number uuid: string + shortUUID: string + createdAt: Date | string updatedAt: Date | string publishedAt: Date | string @@ -18,18 +20,45 @@ export interface Video { licence: VideoConstant language: VideoConstant privacy: VideoConstant + + // Deprecated in 5.0 in favour of truncatedDescription description: string + truncatedDescription: string + duration: number isLocal: boolean name: string + + isLive: boolean + thumbnailPath: string + thumbnailUrl?: string + previewPath: string + previewUrl?: string + embedPath: string + embedUrl?: string + + url: string + views: number + viewers: number + likes: number dislikes: number nsfw: boolean + account: AccountSummary + channel: VideoChannelSummary + + userHistory?: { + currentTime: number + } + + pluginData?: any + + // Additional attributes dependending on the query waitTranscoding?: boolean state?: VideoConstant scheduledUpdate?: VideoScheduleUpdate @@ -37,29 +66,30 @@ export interface Video { blacklisted?: boolean blacklistedReason?: string - account: AccountSummary - channel: VideoChannelSummary + blockedOwner?: boolean + blockedServer?: boolean - userHistory?: { - currentTime: number - } + files?: VideoFile[] + streamingPlaylists?: VideoStreamingPlaylist[] } export interface VideoDetails extends Video { + // Deprecated in 5.0 descriptionPath: string + support: string channel: VideoChannel account: Account tags: string[] - files: VideoFile[] commentsEnabled: boolean downloadEnabled: boolean - // Not optional in details (unlike in Video) + // Not optional in details (unlike in parent Video) waitTranscoding: boolean state: VideoConstant trackerUrls: string[] + files: VideoFile[] streamingPlaylists: VideoStreamingPlaylist[] }