X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftypings%2Fmodels%2Fvideo%2Fvideo.ts;h=82d76f40ca5dc68e50c8d507218c6f03e5c371db;hb=ca6d36227a9273f616a462d3aad6a721ab5dd627;hp=9a53bd337cf5245b1cb06630dd2e9c8479bc1940;hpb=d5c8932a601c1854db0a2e399ccaf26e17385f1a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/typings/models/video/video.ts b/server/typings/models/video/video.ts index 9a53bd337..82d76f40c 100644 --- a/server/typings/models/video/video.ts +++ b/server/typings/models/video/video.ts @@ -9,9 +9,14 @@ import { MChannelUserId } from './video-channels' import { MTag } from './tag' -import { MVideoCaptionLanguage } from './video-caption' -import { MStreamingPlaylist, MStreamingPlaylistRedundancies, MStreamingPlaylistRedundanciesOpt } from './video-streaming-playlist' -import { MVideoFile, MVideoFileRedundanciesOpt } from './video-file' +import { MVideoCaptionLanguage, MVideoCaptionLanguageUrl } from './video-caption' +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' @@ -40,7 +45,8 @@ export type MVideoFeed = Pick // "With" to not confuse with the VideoFile model export type MVideoWithFile = MVideo & - Use<'VideoFiles', MVideoFile[]> + Use<'VideoFiles', MVideoFile[]> & + Use<'VideoStreamingPlaylists', MStreamingPlaylistFiles[]> export type MVideoThumbnail = MVideo & Use<'Thumbnails', MThumbnail[]> @@ -66,7 +72,7 @@ export type MVideoWithCaptions = MVideo & Use<'VideoCaptions', MVideoCaptionLanguage[]> export type MVideoWithStreamingPlaylist = MVideo & - Use<'VideoStreamingPlaylists', MStreamingPlaylist[]> + Use<'VideoStreamingPlaylists', MStreamingPlaylistFiles[]> // ############################################################################ @@ -93,12 +99,12 @@ export type MVideoWithRights = MVideo & export type MVideoWithAllFiles = MVideo & Use<'VideoFiles', MVideoFile[]> & Use<'Thumbnails', MThumbnail[]> & - Use<'VideoStreamingPlaylists', MStreamingPlaylist[]> + Use<'VideoStreamingPlaylists', MStreamingPlaylistFiles[]> export type MVideoAccountLightBlacklistAllFiles = MVideo & Use<'VideoFiles', MVideoFile[]> & Use<'Thumbnails', MThumbnail[]> & - Use<'VideoStreamingPlaylists', MStreamingPlaylist[]> & + Use<'VideoStreamingPlaylists', MStreamingPlaylistFiles[]> & Use<'VideoChannel', MChannelAccountLight> & Use<'VideoBlacklist', MVideoBlacklistLight> @@ -124,7 +130,7 @@ export type MVideoFullLight = MVideo & Use<'UserVideoHistories', MUserVideoHistoryTime[]> & Use<'VideoFiles', MVideoFile[]> & Use<'ScheduleVideoUpdate', MScheduleVideoUpdate> & - Use<'VideoStreamingPlaylists', MStreamingPlaylist[]> + Use<'VideoStreamingPlaylists', MStreamingPlaylistFiles[]> // ############################################################################ @@ -133,10 +139,11 @@ export type MVideoFullLight = MVideo & export type MVideoAP = MVideo & Use<'Tags', MTag[]> & Use<'VideoChannel', MChannelAccountLight> & - Use<'VideoStreamingPlaylists', MStreamingPlaylist[]> & - Use<'VideoCaptions', MVideoCaptionLanguage[]> & + Use<'VideoStreamingPlaylists', MStreamingPlaylistFiles[]> & + Use<'VideoCaptions', MVideoCaptionLanguageUrl[]> & Use<'VideoBlacklist', MVideoBlacklistUnfederated> & - Use<'VideoFiles', MVideoFileRedundanciesOpt[]> + Use<'VideoFiles', MVideoFileRedundanciesOpt[]> & + Use<'Thumbnails', MThumbnail[]> export type MVideoAPWithoutCaption = Omit @@ -156,6 +163,10 @@ export type MVideoForUser = MVideo & Use<'VideoBlacklist', MVideoBlacklistLight> & Use<'Thumbnails', MThumbnail[]> +export type MVideoForRedundancyAPI = MVideo & + Use<'VideoFiles', MVideoFileRedundanciesAll[]> & + Use<'VideoStreamingPlaylists', MStreamingPlaylistRedundanciesAll[]> + // ############################################################################ // Format for API or AP object