X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftypes%2Fmodels%2Fvideo%2Fvideo.ts;h=5225fbce5f959d2a289021bdeea30779c7a2784f;hb=c221d62a8b5b8775fd7d737d1f79a0b764261f18;hp=022a9566d50d3f8267df2af29566c504f8cf5a54;hpb=26d6bf6533023326fa017812cf31bbe20c752d36;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/types/models/video/video.ts b/server/types/models/video/video.ts index 022a9566d..5225fbce5 100644 --- a/server/types/models/video/video.ts +++ b/server/types/models/video/video.ts @@ -1,26 +1,29 @@ +import { PickWith, PickWithOpt } from '@shared/core-utils' import { VideoModel } from '../../../models/video/video' -import { PickWith, PickWithOpt } from '../../utils' +import { MTrackerUrl } from '../server/tracker' +import { MUserVideoHistoryTime } from '../user/user-video-history' +import { MScheduleVideoUpdate } from './schedule-video-update' +import { MTag } from './tag' +import { MThumbnail } from './thumbnail' +import { MVideoBlacklist, MVideoBlacklistLight, MVideoBlacklistUnfederated } from './video-blacklist' +import { MVideoCaptionLanguage, MVideoCaptionLanguageUrl } from './video-caption' import { MChannelAccountDefault, MChannelAccountLight, MChannelAccountSummaryFormattable, MChannelActor, MChannelFormattable, + MChannelHost, MChannelUserId } from './video-channels' -import { MTag } from './tag' -import { MVideoCaptionLanguage, MVideoCaptionLanguageUrl } from './video-caption' +import { MVideoFile, MVideoFileRedundanciesAll, MVideoFileRedundanciesOpt } from './video-file' +import { MVideoLive } from './video-live' import { MStreamingPlaylistFiles, MStreamingPlaylistRedundancies, MStreamingPlaylistRedundanciesAll, MStreamingPlaylistRedundanciesOpt } from './video-streaming-playlist' -import { MVideoFile, MVideoFileRedundanciesAll, MVideoFileRedundanciesOpt } from './video-file' -import { MThumbnail } from './thumbnail' -import { MVideoBlacklist, MVideoBlacklistLight, MVideoBlacklistUnfederated } from './video-blacklist' -import { MScheduleVideoUpdate } from './schedule-video-update' -import { MUserVideoHistoryTime } from '../user/user-video-history' type Use = PickWith @@ -29,7 +32,7 @@ type Use = PickWith export type MVideo = Omit + 'ScheduleVideoUpdate' | 'VideoBlacklist' | 'VideoImport' | 'VideoCaptions' | 'VideoLive'> // ############################################################################ @@ -104,7 +107,6 @@ export type MVideoAccountLight = export type MVideoWithRights = MVideo & Use<'VideoBlacklist', MVideoBlacklistLight> & - Use<'Thumbnails', MThumbnail[]> & Use<'VideoChannel', MChannelUserId> // ############################################################################ @@ -142,6 +144,10 @@ export type MVideoWithChannelActor = MVideo & Use<'VideoChannel', MChannelActor> +export type MVideoWithHost = + MVideo & + Use<'VideoChannel', MChannelHost> + export type MVideoFullLight = MVideo & Use<'Thumbnails', MThumbnail[]> & @@ -151,7 +157,8 @@ export type MVideoFullLight = Use<'UserVideoHistories', MUserVideoHistoryTime[]> & Use<'VideoFiles', MVideoFile[]> & Use<'ScheduleVideoUpdate', MScheduleVideoUpdate> & - Use<'VideoStreamingPlaylists', MStreamingPlaylistFiles[]> + Use<'VideoStreamingPlaylists', MStreamingPlaylistFiles[]> & + Use<'VideoLive', MVideoLive> // ############################################################################ @@ -165,7 +172,8 @@ export type MVideoAP = Use<'VideoCaptions', MVideoCaptionLanguageUrl[]> & Use<'VideoBlacklist', MVideoBlacklistUnfederated> & Use<'VideoFiles', MVideoFileRedundanciesOpt[]> & - Use<'Thumbnails', MThumbnail[]> + Use<'Thumbnails', MThumbnail[]> & + Use<'VideoLive', MVideoLive> export type MVideoAPWithoutCaption = Omit @@ -208,4 +216,5 @@ export type MVideoFormattableDetails = Use<'VideoChannel', MChannelFormattable> & Use<'Tags', MTag[]> & Use<'VideoStreamingPlaylists', MStreamingPlaylistRedundanciesOpt[]> & - Use<'VideoFiles', MVideoFileRedundanciesOpt[]> + Use<'VideoFiles', MVideoFileRedundanciesOpt[]> & + Use<'Trackers', MTrackerUrl[]>