X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fmodels%2Fvideos%2Fvideo.model.ts;h=d9765dbd64e3b636c1c244b37ecc5fc62180faa7;hb=4f50475c67356fb1fecd1de6d2551fdc5ad9a739;hp=557e66e096ee93f83f826a8111b5eee708380798;hpb=583eb04b541175035d6d452ca626a96ebf2b7437;p=github%2FChocobozzz%2FPeerTube.git diff --git a/shared/models/videos/video.model.ts b/shared/models/videos/video.model.ts index 557e66e09..d9765dbd6 100644 --- a/shared/models/videos/video.model.ts +++ b/shared/models/videos/video.model.ts @@ -1,7 +1,7 @@ import { Account, AccountSummary } from '../actors' import { VideoChannel, VideoChannelSummary } from './channel/video-channel.model' +import { VideoFile } from './file' import { VideoConstant } from './video-constant.model' -import { VideoFile } from './video-file.model' import { VideoPrivacy } from './video-privacy.enum' import { VideoScheduleUpdate } from './video-schedule-update.model' import { VideoState } from './video-state.enum' @@ -10,6 +10,8 @@ import { VideoStreamingPlaylist } from './video-streaming-playlist.model' export interface Video { id: number uuid: string + shortUUID: string + createdAt: Date | string updatedAt: Date | string publishedAt: Date | string @@ -23,6 +25,8 @@ export interface Video { isLocal: boolean name: string + isLive: boolean + thumbnailPath: string thumbnailUrl?: string @@ -32,14 +36,25 @@ export interface Video { embedPath: string embedUrl?: string - // When using the search index - url?: 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 @@ -47,12 +62,11 @@ 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 { @@ -61,15 +75,15 @@ export interface VideoDetails extends Video { 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[] }