]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - server/typings/models/video/video-streaming-playlist.ts
Add auto follow back support for instances
[github/Chocobozzz/PeerTube.git] / server / typings / models / video / video-streaming-playlist.ts
1 import { VideoStreamingPlaylistModel } from '../../../models/video/video-streaming-playlist'
2 import { PickWith, PickWithOpt } from '../../utils'
3 import { MVideoRedundancyFileUrl } from './video-redundancy'
4 import { MVideo, MVideoUrl } from '@server/typings/models'
5
6 type Use<K extends keyof VideoStreamingPlaylistModel, M> = PickWith<VideoStreamingPlaylistModel, K, M>
7
8 // ############################################################################
9
10 export type MStreamingPlaylist = Omit<VideoStreamingPlaylistModel, 'Video' | 'RedundancyVideos'>
11
12 export type MStreamingPlaylistVideo = MStreamingPlaylist &
13 Use<'Video', MVideo>
14
15 export type MStreamingPlaylistRedundancies = MStreamingPlaylist &
16 Use<'RedundancyVideos', MVideoRedundancyFileUrl[]>
17
18 export type MStreamingPlaylistRedundanciesOpt = MStreamingPlaylist &
19 PickWithOpt<VideoStreamingPlaylistModel, 'RedundancyVideos', MVideoRedundancyFileUrl[]>