X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftypes%2Fmodels%2Fvideo%2Fvideo.ts;h=58ae7baad3043804c96deb625878e1153ba4e3e8;hb=64aa66c4a61e1c6aa83a775e7af498e288ea82e4;hp=ae23cc30f1804f269c1529bde608978a0290773d;hpb=af4ae64f6faf38f8179f2e07d3cd4ad60006be92;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/types/models/video/video.ts b/server/types/models/video/video.ts index ae23cc30f..58ae7baad 100644 --- a/server/types/models/video/video.ts +++ b/server/types/models/video/video.ts @@ -1,27 +1,29 @@ +import { PickWith, PickWithOpt } from '@shared/typescript-utils' import { VideoModel } from '../../../models/video/video' -import { PickWith, PickWithOpt } from '@shared/core-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, + MChannelHostOnly, 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' -import { MVideoLive } from './video-live' type Use = PickWith @@ -30,7 +32,7 @@ type Use = PickWith export type MVideo = Omit + 'ScheduleVideoUpdate' | 'VideoBlacklist' | 'VideoImport' | 'VideoCaptions' | 'VideoLive' | 'Trackers'> // ############################################################################ @@ -105,7 +107,6 @@ export type MVideoAccountLight = export type MVideoWithRights = MVideo & Use<'VideoBlacklist', MVideoBlacklistLight> & - Use<'Thumbnails', MThumbnail[]> & Use<'VideoChannel', MChannelUserId> // ############################################################################ @@ -143,6 +144,10 @@ export type MVideoWithChannelActor = MVideo & Use<'VideoChannel', MChannelActor> +export type MVideoWithHost = + MVideo & + Use<'VideoChannel', MChannelHostOnly> + export type MVideoFullLight = MVideo & Use<'Thumbnails', MThumbnail[]> & @@ -181,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 & @@ -204,11 +210,14 @@ export type MVideoFormattable = PickWithOpt & Use<'VideoChannel', MChannelAccountSummaryFormattable> & PickWithOpt> & - PickWithOpt> + PickWithOpt> & + PickWithOpt & + PickWithOpt export type MVideoFormattableDetails = MVideoFormattable & Use<'VideoChannel', MChannelFormattable> & Use<'Tags', MTag[]> & Use<'VideoStreamingPlaylists', MStreamingPlaylistRedundanciesOpt[]> & - Use<'VideoFiles', MVideoFileRedundanciesOpt[]> + Use<'VideoFiles', MVideoFileRedundanciesOpt[]> & + PickWithOpt