aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/typings
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-11-15 15:06:03 +0100
committerChocobozzz <me@florianbigard.com>2019-11-25 10:59:43 +0100
commitd7a25329f9e607894d29ab342b9cb66638b56dc0 (patch)
tree6cd6bc4f2689f78944238b313c93427423a932ac /server/typings
parent14981d7331da3f63fe6cfaf020ccb7c910006eaf (diff)
downloadPeerTube-d7a25329f9e607894d29ab342b9cb66638b56dc0.tar.gz
PeerTube-d7a25329f9e607894d29ab342b9cb66638b56dc0.tar.zst
PeerTube-d7a25329f9e607894d29ab342b9cb66638b56dc0.zip
Add ability to disable webtorrent
In favour of HLS
Diffstat (limited to 'server/typings')
-rw-r--r--server/typings/models/account/account.ts2
-rw-r--r--server/typings/models/account/actor-follow.ts5
-rw-r--r--server/typings/models/account/index.ts (renamed from server/typings/models/account/index.d.ts)0
-rw-r--r--server/typings/models/index.ts (renamed from server/typings/models/index.d.ts)0
-rw-r--r--server/typings/models/oauth/index.ts (renamed from server/typings/models/oauth/index.d.ts)0
-rw-r--r--server/typings/models/oauth/oauth-token.ts2
-rw-r--r--server/typings/models/server/index.ts (renamed from server/typings/models/server/index.d.ts)0
-rw-r--r--server/typings/models/server/server-blocklist.ts3
-rw-r--r--server/typings/models/user/index.ts (renamed from server/typings/models/user/index.d.ts)0
-rw-r--r--server/typings/models/user/user.ts2
-rw-r--r--server/typings/models/video/index.ts (renamed from server/typings/models/video/index.d.ts)0
-rw-r--r--server/typings/models/video/schedule-video-update.ts9
-rw-r--r--server/typings/models/video/video-blacklist.ts2
-rw-r--r--server/typings/models/video/video-caption.ts2
-rw-r--r--server/typings/models/video/video-change-ownership.ts5
-rw-r--r--server/typings/models/video/video-comment.ts2
-rw-r--r--server/typings/models/video/video-file.ts17
-rw-r--r--server/typings/models/video/video-import.ts3
-rw-r--r--server/typings/models/video/video-playlist-element.ts3
-rw-r--r--server/typings/models/video/video-rate.ts3
-rw-r--r--server/typings/models/video/video-redundancy.ts6
-rw-r--r--server/typings/models/video/video-streaming-playlist.ts18
-rw-r--r--server/typings/models/video/video.ts18
23 files changed, 73 insertions, 29 deletions
diff --git a/server/typings/models/account/account.ts b/server/typings/models/account/account.ts
index ec78fece8..adb1f3689 100644
--- a/server/typings/models/account/account.ts
+++ b/server/typings/models/account/account.ts
@@ -15,7 +15,7 @@ import {
15} from './actor' 15} from './actor'
16import { FunctionProperties, PickWith } from '../../utils' 16import { FunctionProperties, PickWith } from '../../utils'
17import { MAccountBlocklistId } from './account-blocklist' 17import { MAccountBlocklistId } from './account-blocklist'
18import { MChannelDefault } from '@server/typings/models' 18import { MChannelDefault } from '../video/video-channels'
19 19
20type Use<K extends keyof AccountModel, M> = PickWith<AccountModel, K, M> 20type Use<K extends keyof AccountModel, M> = PickWith<AccountModel, K, M>
21 21
diff --git a/server/typings/models/account/actor-follow.ts b/server/typings/models/account/actor-follow.ts
index 1c66eb0a0..f44157eba 100644
--- a/server/typings/models/account/actor-follow.ts
+++ b/server/typings/models/account/actor-follow.ts
@@ -1,17 +1,16 @@
1import { ActorFollowModel } from '../../../models/activitypub/actor-follow' 1import { ActorFollowModel } from '../../../models/activitypub/actor-follow'
2import { 2import {
3 MActor, 3 MActor,
4 MActorAccount,
5 MActorDefaultAccountChannel,
6 MActorChannelAccountActor, 4 MActorChannelAccountActor,
7 MActorDefault, 5 MActorDefault,
6 MActorDefaultAccountChannel,
8 MActorFormattable, 7 MActorFormattable,
9 MActorHost, 8 MActorHost,
10 MActorUsername 9 MActorUsername
11} from './actor' 10} from './actor'
12import { PickWith } from '../../utils' 11import { PickWith } from '../../utils'
13import { ActorModel } from '@server/models/activitypub/actor' 12import { ActorModel } from '@server/models/activitypub/actor'
14import { MChannelDefault } from '@server/typings/models' 13import { MChannelDefault } from '../video/video-channels'
15 14
16type Use<K extends keyof ActorFollowModel, M> = PickWith<ActorFollowModel, K, M> 15type Use<K extends keyof ActorFollowModel, M> = PickWith<ActorFollowModel, K, M>
17 16
diff --git a/server/typings/models/account/index.d.ts b/server/typings/models/account/index.ts
index 513c09c40..513c09c40 100644
--- a/server/typings/models/account/index.d.ts
+++ b/server/typings/models/account/index.ts
diff --git a/server/typings/models/index.d.ts b/server/typings/models/index.ts
index 78b4948ce..78b4948ce 100644
--- a/server/typings/models/index.d.ts
+++ b/server/typings/models/index.ts
diff --git a/server/typings/models/oauth/index.d.ts b/server/typings/models/oauth/index.ts
index 36b7ea8ca..36b7ea8ca 100644
--- a/server/typings/models/oauth/index.d.ts
+++ b/server/typings/models/oauth/index.ts
diff --git a/server/typings/models/oauth/oauth-token.ts b/server/typings/models/oauth/oauth-token.ts
index af3412925..8ef042d4e 100644
--- a/server/typings/models/oauth/oauth-token.ts
+++ b/server/typings/models/oauth/oauth-token.ts
@@ -1,6 +1,6 @@
1import { OAuthTokenModel } from '@server/models/oauth/oauth-token' 1import { OAuthTokenModel } from '@server/models/oauth/oauth-token'
2import { PickWith } from '@server/typings/utils' 2import { PickWith } from '@server/typings/utils'
3import { MUserAccountUrl } from '@server/typings/models' 3import { MUserAccountUrl } from '../user/user'
4 4
5type Use<K extends keyof OAuthTokenModel, M> = PickWith<OAuthTokenModel, K, M> 5type Use<K extends keyof OAuthTokenModel, M> = PickWith<OAuthTokenModel, K, M>
6 6
diff --git a/server/typings/models/server/index.d.ts b/server/typings/models/server/index.ts
index c853795ad..c853795ad 100644
--- a/server/typings/models/server/index.d.ts
+++ b/server/typings/models/server/index.ts
diff --git a/server/typings/models/server/server-blocklist.ts b/server/typings/models/server/server-blocklist.ts
index c81f604f5..c3e6230f2 100644
--- a/server/typings/models/server/server-blocklist.ts
+++ b/server/typings/models/server/server-blocklist.ts
@@ -1,6 +1,7 @@
1import { ServerBlocklistModel } from '@server/models/server/server-blocklist' 1import { ServerBlocklistModel } from '@server/models/server/server-blocklist'
2import { PickWith } from '@server/typings/utils' 2import { PickWith } from '@server/typings/utils'
3import { MAccountDefault, MAccountFormattable, MServer, MServerFormattable } from '@server/typings/models' 3import { MAccountDefault, MAccountFormattable } from '../account/account'
4import { MServer, MServerFormattable } from './server'
4 5
5type Use<K extends keyof ServerBlocklistModel, M> = PickWith<ServerBlocklistModel, K, M> 6type Use<K extends keyof ServerBlocklistModel, M> = PickWith<ServerBlocklistModel, K, M>
6 7
diff --git a/server/typings/models/user/index.d.ts b/server/typings/models/user/index.ts
index 6657b2128..6657b2128 100644
--- a/server/typings/models/user/index.d.ts
+++ b/server/typings/models/user/index.ts
diff --git a/server/typings/models/user/user.ts b/server/typings/models/user/user.ts
index 52d6d4a05..a2750adc7 100644
--- a/server/typings/models/user/user.ts
+++ b/server/typings/models/user/user.ts
@@ -11,7 +11,7 @@ import {
11} from '../account' 11} from '../account'
12import { MNotificationSetting, MNotificationSettingFormattable } from './user-notification-setting' 12import { MNotificationSetting, MNotificationSettingFormattable } from './user-notification-setting'
13import { AccountModel } from '@server/models/account/account' 13import { AccountModel } from '@server/models/account/account'
14import { MChannelFormattable } from '@server/typings/models' 14import { MChannelFormattable } from '../video/video-channels'
15 15
16type Use<K extends keyof UserModel, M> = PickWith<UserModel, K, M> 16type Use<K extends keyof UserModel, M> = PickWith<UserModel, K, M>
17 17
diff --git a/server/typings/models/video/index.d.ts b/server/typings/models/video/index.ts
index bd69c8a4b..bd69c8a4b 100644
--- a/server/typings/models/video/index.d.ts
+++ b/server/typings/models/video/index.ts
diff --git a/server/typings/models/video/schedule-video-update.ts b/server/typings/models/video/schedule-video-update.ts
index ada9af06e..e6f478cdf 100644
--- a/server/typings/models/video/schedule-video-update.ts
+++ b/server/typings/models/video/schedule-video-update.ts
@@ -1,9 +1,18 @@
1import { ScheduleVideoUpdateModel } from '../../../models/video/schedule-video-update' 1import { ScheduleVideoUpdateModel } from '../../../models/video/schedule-video-update'
2import { PickWith } from '@server/typings/utils'
3import { MVideoAPWithoutCaption, MVideoWithBlacklistLight } from './video'
4
5type Use<K extends keyof ScheduleVideoUpdateModel, M> = PickWith<ScheduleVideoUpdateModel, K, M>
6
7// ############################################################################
2 8
3export type MScheduleVideoUpdate = Omit<ScheduleVideoUpdateModel, 'Video'> 9export type MScheduleVideoUpdate = Omit<ScheduleVideoUpdateModel, 'Video'>
4 10
5// ############################################################################ 11// ############################################################################
6 12
13export type MScheduleVideoUpdateVideoAll = MScheduleVideoUpdate &
14 Use<'Video', MVideoAPWithoutCaption & MVideoWithBlacklistLight>
15
7// Format for API or AP object 16// Format for API or AP object
8 17
9export type MScheduleVideoUpdateFormattable = Pick<MScheduleVideoUpdate, 'updateAt' | 'privacy'> 18export type MScheduleVideoUpdateFormattable = Pick<MScheduleVideoUpdate, 'updateAt' | 'privacy'>
diff --git a/server/typings/models/video/video-blacklist.ts b/server/typings/models/video/video-blacklist.ts
index e12880454..7122a9dc0 100644
--- a/server/typings/models/video/video-blacklist.ts
+++ b/server/typings/models/video/video-blacklist.ts
@@ -1,6 +1,6 @@
1import { VideoBlacklistModel } from '../../../models/video/video-blacklist' 1import { VideoBlacklistModel } from '../../../models/video/video-blacklist'
2import { PickWith } from '@server/typings/utils' 2import { PickWith } from '@server/typings/utils'
3import { MVideo, MVideoFormattable } from '@server/typings/models' 3import { MVideo, MVideoFormattable } from './video'
4 4
5type Use<K extends keyof VideoBlacklistModel, M> = PickWith<VideoBlacklistModel, K, M> 5type Use<K extends keyof VideoBlacklistModel, M> = PickWith<VideoBlacklistModel, K, M>
6 6
diff --git a/server/typings/models/video/video-caption.ts b/server/typings/models/video/video-caption.ts
index 7cb2a2ad3..ffa56f544 100644
--- a/server/typings/models/video/video-caption.ts
+++ b/server/typings/models/video/video-caption.ts
@@ -1,6 +1,6 @@
1import { VideoCaptionModel } from '../../../models/video/video-caption' 1import { VideoCaptionModel } from '../../../models/video/video-caption'
2import { FunctionProperties, PickWith } from '@server/typings/utils' 2import { FunctionProperties, PickWith } from '@server/typings/utils'
3import { MVideo, MVideoUUID } from '@server/typings/models' 3import { MVideo, MVideoUUID } from './video'
4 4
5type Use<K extends keyof VideoCaptionModel, M> = PickWith<VideoCaptionModel, K, M> 5type Use<K extends keyof VideoCaptionModel, M> = PickWith<VideoCaptionModel, K, M>
6 6
diff --git a/server/typings/models/video/video-change-ownership.ts b/server/typings/models/video/video-change-ownership.ts
index 72634cdb2..e5b5bbc1d 100644
--- a/server/typings/models/video/video-change-ownership.ts
+++ b/server/typings/models/video/video-change-ownership.ts
@@ -1,6 +1,7 @@
1import { VideoChangeOwnershipModel } from '@server/models/video/video-change-ownership' 1import { VideoChangeOwnershipModel } from '@server/models/video/video-change-ownership'
2import { PickWith } from '@server/typings/utils' 2import { PickWith } from '@server/typings/utils'
3import { MAccountDefault, MAccountFormattable, MVideo, MVideoWithFileThumbnail } from '@server/typings/models' 3import { MAccountDefault, MAccountFormattable } from '../account/account'
4import { MVideo, MVideoWithAllFiles } from './video'
4 5
5type Use<K extends keyof VideoChangeOwnershipModel, M> = PickWith<VideoChangeOwnershipModel, K, M> 6type Use<K extends keyof VideoChangeOwnershipModel, M> = PickWith<VideoChangeOwnershipModel, K, M>
6 7
@@ -11,7 +12,7 @@ export type MVideoChangeOwnership = Omit<VideoChangeOwnershipModel, 'Initiator'
11export type MVideoChangeOwnershipFull = MVideoChangeOwnership & 12export type MVideoChangeOwnershipFull = MVideoChangeOwnership &
12 Use<'Initiator', MAccountDefault> & 13 Use<'Initiator', MAccountDefault> &
13 Use<'NextOwner', MAccountDefault> & 14 Use<'NextOwner', MAccountDefault> &
14 Use<'Video', MVideoWithFileThumbnail> 15 Use<'Video', MVideoWithAllFiles>
15 16
16// ############################################################################ 17// ############################################################################
17 18
diff --git a/server/typings/models/video/video-comment.ts b/server/typings/models/video/video-comment.ts
index 4fd1c29e8..d693f9186 100644
--- a/server/typings/models/video/video-comment.ts
+++ b/server/typings/models/video/video-comment.ts
@@ -1,6 +1,6 @@
1import { VideoCommentModel } from '../../../models/video/video-comment' 1import { VideoCommentModel } from '../../../models/video/video-comment'
2import { PickWith, PickWithOpt } from '../../utils' 2import { PickWith, PickWithOpt } from '../../utils'
3import { MAccountDefault, MAccountFormattable, MAccountUrl, MActorUrl } from '../account' 3import { MAccountDefault, MAccountFormattable, MAccountUrl } from '../account'
4import { MVideoAccountLight, MVideoFeed, MVideoIdUrl, MVideoUrl } from './video' 4import { MVideoAccountLight, MVideoFeed, MVideoIdUrl, MVideoUrl } from './video'
5 5
6type Use<K extends keyof VideoCommentModel, M> = PickWith<VideoCommentModel, K, M> 6type Use<K extends keyof VideoCommentModel, M> = PickWith<VideoCommentModel, K, M>
diff --git a/server/typings/models/video/video-file.ts b/server/typings/models/video/video-file.ts
index 484351a8d..352fe3d32 100644
--- a/server/typings/models/video/video-file.ts
+++ b/server/typings/models/video/video-file.ts
@@ -2,18 +2,33 @@ import { VideoFileModel } from '../../../models/video/video-file'
2import { PickWith, PickWithOpt } from '../../utils' 2import { PickWith, PickWithOpt } from '../../utils'
3import { MVideo, MVideoUUID } from './video' 3import { MVideo, MVideoUUID } from './video'
4import { MVideoRedundancyFileUrl } from './video-redundancy' 4import { MVideoRedundancyFileUrl } from './video-redundancy'
5import { MStreamingPlaylistVideo, MStreamingPlaylist } from './video-streaming-playlist'
5 6
6type Use<K extends keyof VideoFileModel, M> = PickWith<VideoFileModel, K, M> 7type Use<K extends keyof VideoFileModel, M> = PickWith<VideoFileModel, K, M>
7 8
8// ############################################################################ 9// ############################################################################
9 10
10export type MVideoFile = Omit<VideoFileModel, 'Video' | 'RedundancyVideos'> 11export type MVideoFile = Omit<VideoFileModel, 'Video' | 'RedundancyVideos' | 'VideoStreamingPlaylist'>
11 12
12export type MVideoFileVideo = MVideoFile & 13export type MVideoFileVideo = MVideoFile &
13 Use<'Video', MVideo> 14 Use<'Video', MVideo>
14 15
16export type MVideoFileStreamingPlaylist = MVideoFile &
17 Use<'VideoStreamingPlaylist', MStreamingPlaylist>
18
19export type MVideoFileStreamingPlaylistVideo = MVideoFile &
20 Use<'VideoStreamingPlaylist', MStreamingPlaylistVideo>
21
15export type MVideoFileVideoUUID = MVideoFile & 22export type MVideoFileVideoUUID = MVideoFile &
16 Use<'Video', MVideoUUID> 23 Use<'Video', MVideoUUID>
17 24
18export type MVideoFileRedundanciesOpt = MVideoFile & 25export type MVideoFileRedundanciesOpt = MVideoFile &
19 PickWithOpt<VideoFileModel, 'RedundancyVideos', MVideoRedundancyFileUrl[]> 26 PickWithOpt<VideoFileModel, 'RedundancyVideos', MVideoRedundancyFileUrl[]>
27
28export function isStreamingPlaylistFile (file: any): file is MVideoFileStreamingPlaylist {
29 return !!file.videoStreamingPlaylistId
30}
31
32export function isWebtorrentFile (file: any): file is MVideoFileVideo {
33 return !!file.videoId
34}
diff --git a/server/typings/models/video/video-import.ts b/server/typings/models/video/video-import.ts
index c6a1c5b66..e119f17f9 100644
--- a/server/typings/models/video/video-import.ts
+++ b/server/typings/models/video/video-import.ts
@@ -1,6 +1,7 @@
1import { VideoImportModel } from '@server/models/video/video-import' 1import { VideoImportModel } from '@server/models/video/video-import'
2import { PickWith, PickWithOpt } from '@server/typings/utils' 2import { PickWith, PickWithOpt } from '@server/typings/utils'
3import { MUser, MVideo, MVideoAccountLight, MVideoFormattable, MVideoTag, MVideoThumbnail, MVideoWithFile } from '@server/typings/models' 3import { MVideo, MVideoAccountLight, MVideoFormattable, MVideoTag, MVideoThumbnail, MVideoWithFile } from './video'
4import { MUser } from '../user/user'
4 5
5type Use<K extends keyof VideoImportModel, M> = PickWith<VideoImportModel, K, M> 6type Use<K extends keyof VideoImportModel, M> = PickWith<VideoImportModel, K, M>
6 7
diff --git a/server/typings/models/video/video-playlist-element.ts b/server/typings/models/video/video-playlist-element.ts
index 7b1b993ce..1aeff78d8 100644
--- a/server/typings/models/video/video-playlist-element.ts
+++ b/server/typings/models/video/video-playlist-element.ts
@@ -1,6 +1,7 @@
1import { VideoPlaylistElementModel } from '@server/models/video/video-playlist-element' 1import { VideoPlaylistElementModel } from '@server/models/video/video-playlist-element'
2import { PickWith } from '@server/typings/utils' 2import { PickWith } from '@server/typings/utils'
3import { MVideoFormattable, MVideoPlaylistPrivacy, MVideoThumbnail, MVideoUrl } from '@server/typings/models' 3import { MVideoFormattable, MVideoThumbnail, MVideoUrl } from './video'
4import { MVideoPlaylistPrivacy } from './video-playlist'
4 5
5type Use<K extends keyof VideoPlaylistElementModel, M> = PickWith<VideoPlaylistElementModel, K, M> 6type Use<K extends keyof VideoPlaylistElementModel, M> = PickWith<VideoPlaylistElementModel, K, M>
6 7
diff --git a/server/typings/models/video/video-rate.ts b/server/typings/models/video/video-rate.ts
index 2ff8a625b..f6bb527fc 100644
--- a/server/typings/models/video/video-rate.ts
+++ b/server/typings/models/video/video-rate.ts
@@ -1,6 +1,7 @@
1import { AccountVideoRateModel } from '@server/models/account/account-video-rate' 1import { AccountVideoRateModel } from '@server/models/account/account-video-rate'
2import { PickWith } from '@server/typings/utils' 2import { PickWith } from '@server/typings/utils'
3import { MAccountAudience, MAccountUrl, MVideo, MVideoFormattable } from '..' 3import { MAccountAudience, MAccountUrl } from '../account/account'
4import { MVideo, MVideoFormattable } from './video'
4 5
5type Use<K extends keyof AccountVideoRateModel, M> = PickWith<AccountVideoRateModel, K, M> 6type Use<K extends keyof AccountVideoRateModel, M> = PickWith<AccountVideoRateModel, K, M>
6 7
diff --git a/server/typings/models/video/video-redundancy.ts b/server/typings/models/video/video-redundancy.ts
index f3846afd7..25bdac057 100644
--- a/server/typings/models/video/video-redundancy.ts
+++ b/server/typings/models/video/video-redundancy.ts
@@ -1,10 +1,10 @@
1import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy' 1import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy'
2import { PickWith, PickWithOpt } from '@server/typings/utils' 2import { PickWith, PickWithOpt } from '@server/typings/utils'
3import { MStreamingPlaylistVideo, MVideoFile, MVideoFileVideo, MVideoUrl } from '@server/typings/models'
4import { VideoStreamingPlaylist } from '../../../../shared/models/videos/video-streaming-playlist.model'
5import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist' 3import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist'
6import { VideoFile } from '../../../../shared/models/videos'
7import { VideoFileModel } from '@server/models/video/video-file' 4import { VideoFileModel } from '@server/models/video/video-file'
5import { MVideoFile, MVideoFileVideo } from './video-file'
6import { MStreamingPlaylistVideo } from './video-streaming-playlist'
7import { MVideoUrl } from './video'
8 8
9type Use<K extends keyof VideoRedundancyModel, M> = PickWith<VideoRedundancyModel, K, M> 9type Use<K extends keyof VideoRedundancyModel, M> = PickWith<VideoRedundancyModel, K, M>
10 10
diff --git a/server/typings/models/video/video-streaming-playlist.ts b/server/typings/models/video/video-streaming-playlist.ts
index 79696bcff..436c0c072 100644
--- a/server/typings/models/video/video-streaming-playlist.ts
+++ b/server/typings/models/video/video-streaming-playlist.ts
@@ -1,19 +1,33 @@
1import { VideoStreamingPlaylistModel } from '../../../models/video/video-streaming-playlist' 1import { VideoStreamingPlaylistModel } from '../../../models/video/video-streaming-playlist'
2import { PickWith, PickWithOpt } from '../../utils' 2import { PickWith, PickWithOpt } from '../../utils'
3import { MVideoRedundancyFileUrl } from './video-redundancy' 3import { MVideoRedundancyFileUrl } from './video-redundancy'
4import { MVideo, MVideoUrl } from '@server/typings/models' 4import { MVideo } from './video'
5import { MVideoFile } from './video-file'
5 6
6type Use<K extends keyof VideoStreamingPlaylistModel, M> = PickWith<VideoStreamingPlaylistModel, K, M> 7type Use<K extends keyof VideoStreamingPlaylistModel, M> = PickWith<VideoStreamingPlaylistModel, K, M>
7 8
8// ############################################################################ 9// ############################################################################
9 10
10export type MStreamingPlaylist = Omit<VideoStreamingPlaylistModel, 'Video' | 'RedundancyVideos'> 11export type MStreamingPlaylist = Omit<VideoStreamingPlaylistModel, 'Video' | 'RedundancyVideos' | 'VideoFiles'>
12
13export type MStreamingPlaylistFiles = MStreamingPlaylist &
14 Use<'VideoFiles', MVideoFile[]>
11 15
12export type MStreamingPlaylistVideo = MStreamingPlaylist & 16export type MStreamingPlaylistVideo = MStreamingPlaylist &
13 Use<'Video', MVideo> 17 Use<'Video', MVideo>
14 18
19export type MStreamingPlaylistFilesVideo = MStreamingPlaylist &
20 Use<'VideoFiles', MVideoFile[]> &
21 Use<'Video', MVideo>
22
15export type MStreamingPlaylistRedundancies = MStreamingPlaylist & 23export type MStreamingPlaylistRedundancies = MStreamingPlaylist &
24 Use<'VideoFiles', MVideoFile[]> &
16 Use<'RedundancyVideos', MVideoRedundancyFileUrl[]> 25 Use<'RedundancyVideos', MVideoRedundancyFileUrl[]>
17 26
18export type MStreamingPlaylistRedundanciesOpt = MStreamingPlaylist & 27export type MStreamingPlaylistRedundanciesOpt = MStreamingPlaylist &
28 Use<'VideoFiles', MVideoFile[]> &
19 PickWithOpt<VideoStreamingPlaylistModel, 'RedundancyVideos', MVideoRedundancyFileUrl[]> 29 PickWithOpt<VideoStreamingPlaylistModel, 'RedundancyVideos', MVideoRedundancyFileUrl[]>
30
31export function isStreamingPlaylist (value: MVideo | MStreamingPlaylistVideo): value is MStreamingPlaylistVideo {
32 return !!(value as MStreamingPlaylist).playlistUrl
33}
diff --git a/server/typings/models/video/video.ts b/server/typings/models/video/video.ts
index 9a53bd337..7f69a91de 100644
--- a/server/typings/models/video/video.ts
+++ b/server/typings/models/video/video.ts
@@ -10,7 +10,7 @@ import {
10} from './video-channels' 10} from './video-channels'
11import { MTag } from './tag' 11import { MTag } from './tag'
12import { MVideoCaptionLanguage } from './video-caption' 12import { MVideoCaptionLanguage } from './video-caption'
13import { MStreamingPlaylist, MStreamingPlaylistRedundancies, MStreamingPlaylistRedundanciesOpt } from './video-streaming-playlist' 13import { MStreamingPlaylistFiles, MStreamingPlaylistRedundancies, MStreamingPlaylistRedundanciesOpt } from './video-streaming-playlist'
14import { MVideoFile, MVideoFileRedundanciesOpt } from './video-file' 14import { MVideoFile, MVideoFileRedundanciesOpt } from './video-file'
15import { MThumbnail } from './thumbnail' 15import { MThumbnail } from './thumbnail'
16import { MVideoBlacklist, MVideoBlacklistLight, MVideoBlacklistUnfederated } from './video-blacklist' 16import { MVideoBlacklist, MVideoBlacklistLight, MVideoBlacklistUnfederated } from './video-blacklist'
@@ -40,7 +40,8 @@ export type MVideoFeed = Pick<MVideo, 'name' | 'uuid'>
40 40
41// "With" to not confuse with the VideoFile model 41// "With" to not confuse with the VideoFile model
42export type MVideoWithFile = MVideo & 42export type MVideoWithFile = MVideo &
43 Use<'VideoFiles', MVideoFile[]> 43 Use<'VideoFiles', MVideoFile[]> &
44 Use<'VideoStreamingPlaylists', MStreamingPlaylistFiles[]>
44 45
45export type MVideoThumbnail = MVideo & 46export type MVideoThumbnail = MVideo &
46 Use<'Thumbnails', MThumbnail[]> 47 Use<'Thumbnails', MThumbnail[]>
@@ -66,7 +67,7 @@ export type MVideoWithCaptions = MVideo &
66 Use<'VideoCaptions', MVideoCaptionLanguage[]> 67 Use<'VideoCaptions', MVideoCaptionLanguage[]>
67 68
68export type MVideoWithStreamingPlaylist = MVideo & 69export type MVideoWithStreamingPlaylist = MVideo &
69 Use<'VideoStreamingPlaylists', MStreamingPlaylist[]> 70 Use<'VideoStreamingPlaylists', MStreamingPlaylistFiles[]>
70 71
71// ############################################################################ 72// ############################################################################
72 73
@@ -93,12 +94,12 @@ export type MVideoWithRights = MVideo &
93export type MVideoWithAllFiles = MVideo & 94export type MVideoWithAllFiles = MVideo &
94 Use<'VideoFiles', MVideoFile[]> & 95 Use<'VideoFiles', MVideoFile[]> &
95 Use<'Thumbnails', MThumbnail[]> & 96 Use<'Thumbnails', MThumbnail[]> &
96 Use<'VideoStreamingPlaylists', MStreamingPlaylist[]> 97 Use<'VideoStreamingPlaylists', MStreamingPlaylistFiles[]>
97 98
98export type MVideoAccountLightBlacklistAllFiles = MVideo & 99export type MVideoAccountLightBlacklistAllFiles = MVideo &
99 Use<'VideoFiles', MVideoFile[]> & 100 Use<'VideoFiles', MVideoFile[]> &
100 Use<'Thumbnails', MThumbnail[]> & 101 Use<'Thumbnails', MThumbnail[]> &
101 Use<'VideoStreamingPlaylists', MStreamingPlaylist[]> & 102 Use<'VideoStreamingPlaylists', MStreamingPlaylistFiles[]> &
102 Use<'VideoChannel', MChannelAccountLight> & 103 Use<'VideoChannel', MChannelAccountLight> &
103 Use<'VideoBlacklist', MVideoBlacklistLight> 104 Use<'VideoBlacklist', MVideoBlacklistLight>
104 105
@@ -124,7 +125,7 @@ export type MVideoFullLight = MVideo &
124 Use<'UserVideoHistories', MUserVideoHistoryTime[]> & 125 Use<'UserVideoHistories', MUserVideoHistoryTime[]> &
125 Use<'VideoFiles', MVideoFile[]> & 126 Use<'VideoFiles', MVideoFile[]> &
126 Use<'ScheduleVideoUpdate', MScheduleVideoUpdate> & 127 Use<'ScheduleVideoUpdate', MScheduleVideoUpdate> &
127 Use<'VideoStreamingPlaylists', MStreamingPlaylist[]> 128 Use<'VideoStreamingPlaylists', MStreamingPlaylistFiles[]>
128 129
129// ############################################################################ 130// ############################################################################
130 131
@@ -133,10 +134,11 @@ export type MVideoFullLight = MVideo &
133export type MVideoAP = MVideo & 134export type MVideoAP = MVideo &
134 Use<'Tags', MTag[]> & 135 Use<'Tags', MTag[]> &
135 Use<'VideoChannel', MChannelAccountLight> & 136 Use<'VideoChannel', MChannelAccountLight> &
136 Use<'VideoStreamingPlaylists', MStreamingPlaylist[]> & 137 Use<'VideoStreamingPlaylists', MStreamingPlaylistFiles[]> &
137 Use<'VideoCaptions', MVideoCaptionLanguage[]> & 138 Use<'VideoCaptions', MVideoCaptionLanguage[]> &
138 Use<'VideoBlacklist', MVideoBlacklistUnfederated> & 139 Use<'VideoBlacklist', MVideoBlacklistUnfederated> &
139 Use<'VideoFiles', MVideoFileRedundanciesOpt[]> 140 Use<'VideoFiles', MVideoFileRedundanciesOpt[]> &
141 Use<'Thumbnails', MThumbnail[]>
140 142
141export type MVideoAPWithoutCaption = Omit<MVideoAP, 'VideoCaptions'> 143export type MVideoAPWithoutCaption = Omit<MVideoAP, 'VideoCaptions'>
142 144