From d896fef7e21cacfb44967eb9059fe543a66f5dd0 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 5 Jun 2023 13:22:16 +0200 Subject: Refactor video formatter --- shared/models/videos/video.model.ts | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'shared/models/videos') diff --git a/shared/models/videos/video.model.ts b/shared/models/videos/video.model.ts index 06ffb327c..9004efb35 100644 --- a/shared/models/videos/video.model.ts +++ b/shared/models/videos/video.model.ts @@ -7,7 +7,7 @@ import { VideoScheduleUpdate } from './video-schedule-update.model' import { VideoState } from './video-state.enum' import { VideoStreamingPlaylist } from './video-streaming-playlist.model' -export interface Video { +export interface Video extends Partial { id: number uuid: string shortUUID: string @@ -57,20 +57,22 @@ export interface Video { } pluginData?: any +} - // Additional attributes dependending on the query - waitTranscoding?: boolean - state?: VideoConstant - scheduledUpdate?: VideoScheduleUpdate +// Not included by default, needs query params +export interface VideoAdditionalAttributes { + waitTranscoding: boolean + state: VideoConstant + scheduledUpdate: VideoScheduleUpdate - blacklisted?: boolean - blacklistedReason?: string + blacklisted: boolean + blacklistedReason: string - blockedOwner?: boolean - blockedServer?: boolean + blockedOwner: boolean + blockedServer: boolean - files?: VideoFile[] - streamingPlaylists?: VideoStreamingPlaylist[] + files: VideoFile[] + streamingPlaylists: VideoStreamingPlaylist[] } export interface VideoDetails extends Video { -- cgit v1.2.3