aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-06-05 13:22:16 +0200
committerChocobozzz <me@florianbigard.com>2023-06-29 10:18:00 +0200
commitd896fef7e21cacfb44967eb9059fe543a66f5dd0 (patch)
tree153f0810cb4137b8df04bd94053f6a4f0db24b56 /shared/models/videos
parent638a2950215af1f11be8e8bdd136ca12e5176c32 (diff)
downloadPeerTube-d896fef7e21cacfb44967eb9059fe543a66f5dd0.tar.gz
PeerTube-d896fef7e21cacfb44967eb9059fe543a66f5dd0.tar.zst
PeerTube-d896fef7e21cacfb44967eb9059fe543a66f5dd0.zip
Refactor video formatter
Diffstat (limited to 'shared/models/videos')
-rw-r--r--shared/models/videos/video.model.ts24
1 files changed, 13 insertions, 11 deletions
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'
7import { VideoState } from './video-state.enum' 7import { VideoState } from './video-state.enum'
8import { VideoStreamingPlaylist } from './video-streaming-playlist.model' 8import { VideoStreamingPlaylist } from './video-streaming-playlist.model'
9 9
10export interface Video { 10export interface Video extends Partial<VideoAdditionalAttributes> {
11 id: number 11 id: number
12 uuid: string 12 uuid: string
13 shortUUID: string 13 shortUUID: string
@@ -57,20 +57,22 @@ export interface Video {
57 } 57 }
58 58
59 pluginData?: any 59 pluginData?: any
60}
60 61
61 // Additional attributes dependending on the query 62// Not included by default, needs query params
62 waitTranscoding?: boolean 63export interface VideoAdditionalAttributes {
63 state?: VideoConstant<VideoState> 64 waitTranscoding: boolean
64 scheduledUpdate?: VideoScheduleUpdate 65 state: VideoConstant<VideoState>
66 scheduledUpdate: VideoScheduleUpdate
65 67
66 blacklisted?: boolean 68 blacklisted: boolean
67 blacklistedReason?: string 69 blacklistedReason: string
68 70
69 blockedOwner?: boolean 71 blockedOwner: boolean
70 blockedServer?: boolean 72 blockedServer: boolean
71 73
72 files?: VideoFile[] 74 files: VideoFile[]
73 streamingPlaylists?: VideoStreamingPlaylist[] 75 streamingPlaylists: VideoStreamingPlaylist[]
74} 76}
75 77
76export interface VideoDetails extends Video { 78export interface VideoDetails extends Video {