]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/types/models/video/video.ts
Don't fail remote transcoding on retry
[github/Chocobozzz/PeerTube.git] / server / types / models / video / video.ts
index 692490230bcfa6b611e6be294f5bdc1fe24b3644..58ae7baad3043804c96deb625878e1153ba4e3e8 100644 (file)
@@ -1,4 +1,4 @@
-import { PickWith, PickWithOpt } from '@shared/core-utils'
+import { PickWith, PickWithOpt } from '@shared/typescript-utils'
 import { VideoModel } from '../../../models/video/video'
 import { MTrackerUrl } from '../server/tracker'
 import { MUserVideoHistoryTime } from '../user/user-video-history'
@@ -13,7 +13,7 @@ import {
   MChannelAccountSummaryFormattable,
   MChannelActor,
   MChannelFormattable,
-  MChannelHost,
+  MChannelHostOnly,
   MChannelUserId
 } from './video-channels'
 import { MVideoFile, MVideoFileRedundanciesAll, MVideoFileRedundanciesOpt } from './video-file'
@@ -32,7 +32,7 @@ type Use<K extends keyof VideoModel, M> = PickWith<VideoModel, K, M>
 export type MVideo =
   Omit<VideoModel, 'VideoChannel' | 'Tags' | 'Thumbnails' | 'VideoPlaylistElements' | 'VideoAbuses' |
   'VideoFiles' | 'VideoStreamingPlaylists' | 'VideoShares' | 'AccountVideoRates' | 'VideoComments' | 'VideoViews' | 'UserVideoHistories' |
-  'ScheduleVideoUpdate' | 'VideoBlacklist' | 'VideoImport' | 'VideoCaptions' | 'VideoLive'>
+  'ScheduleVideoUpdate' | 'VideoBlacklist' | 'VideoImport' | 'VideoCaptions' | 'VideoLive' | 'Trackers'>
 
 // ############################################################################
 
@@ -107,7 +107,6 @@ export type MVideoAccountLight =
 export type MVideoWithRights =
   MVideo &
   Use<'VideoBlacklist', MVideoBlacklistLight> &
-  Use<'Thumbnails', MThumbnail[]> &
   Use<'VideoChannel', MChannelUserId>
 
 // ############################################################################
@@ -147,7 +146,7 @@ export type MVideoWithChannelActor =
 
 export type MVideoWithHost =
   MVideo &
-  Use<'VideoChannel', MChannelHost>
+  Use<'VideoChannel', MChannelHostOnly>
 
 export type MVideoFullLight =
   MVideo &
@@ -187,7 +186,8 @@ export type MVideoDetails =
   Use<'Thumbnails', MThumbnail[]> &
   Use<'UserVideoHistories', MUserVideoHistoryTime[]> &
   Use<'VideoStreamingPlaylists', MStreamingPlaylistRedundancies[]> &
-  Use<'VideoFiles', MVideoFileRedundanciesOpt[]>
+  Use<'VideoFiles', MVideoFileRedundanciesOpt[]> &
+  Use<'Trackers', MTrackerUrl[]>
 
 export type MVideoForUser =
   MVideo &
@@ -210,7 +210,9 @@ export type MVideoFormattable =
   PickWithOpt<VideoModel, 'UserVideoHistories', MUserVideoHistoryTime[]> &
   Use<'VideoChannel', MChannelAccountSummaryFormattable> &
   PickWithOpt<VideoModel, 'ScheduleVideoUpdate', Pick<MScheduleVideoUpdate, 'updateAt' | 'privacy'>> &
-  PickWithOpt<VideoModel, 'VideoBlacklist', Pick<MVideoBlacklist, 'reason'>>
+  PickWithOpt<VideoModel, 'VideoBlacklist', Pick<MVideoBlacklist, 'reason'>> &
+  PickWithOpt<VideoModel, 'VideoStreamingPlaylists', MStreamingPlaylistFiles[]> &
+  PickWithOpt<VideoModel, 'VideoFiles', MVideoFile[]>
 
 export type MVideoFormattableDetails =
   MVideoFormattable &
@@ -218,4 +220,4 @@ export type MVideoFormattableDetails =
   Use<'Tags', MTag[]> &
   Use<'VideoStreamingPlaylists', MStreamingPlaylistRedundanciesOpt[]> &
   Use<'VideoFiles', MVideoFileRedundanciesOpt[]> &
-  Use<'Trackers', MTrackerUrl[]>
+  PickWithOpt<VideoModel, 'Trackers', MTrackerUrl[]>