aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/types
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-02-16 16:25:53 +0100
committerChocobozzz <chocobozzz@cpy.re>2021-02-18 13:38:09 +0100
commit90a8bd305de4153ec21137a73ff482dcc2e3e19b (patch)
tree2e35b5504ec11bc51579c92a70c77ed3d5ace816 /server/types
parent684cdacbbd775b5f404dd7b373e02dd21baf5ff0 (diff)
downloadPeerTube-90a8bd305de4153ec21137a73ff482dcc2e3e19b.tar.gz
PeerTube-90a8bd305de4153ec21137a73ff482dcc2e3e19b.tar.zst
PeerTube-90a8bd305de4153ec21137a73ff482dcc2e3e19b.zip
Dissociate video file names and video uuid
Diffstat (limited to 'server/types')
-rw-r--r--server/types/models/video/video-channels.ts5
-rw-r--r--server/types/models/video/video.ts23
2 files changed, 19 insertions, 9 deletions
diff --git a/server/types/models/video/video-channels.ts b/server/types/models/video/video-channels.ts
index 2e05d8753..77790daa4 100644
--- a/server/types/models/video/video-channels.ts
+++ b/server/types/models/video/video-channels.ts
@@ -17,6 +17,7 @@ import {
17 MActorDefault, 17 MActorDefault,
18 MActorDefaultLight, 18 MActorDefaultLight,
19 MActorFormattable, 19 MActorFormattable,
20 MActorHost,
20 MActorLight, 21 MActorLight,
21 MActorSummary, 22 MActorSummary,
22 MActorSummaryFormattable, MActorUrl 23 MActorSummaryFormattable, MActorUrl
@@ -71,6 +72,10 @@ export type MChannelAccountLight =
71 Use<'Actor', MActorDefaultLight> & 72 Use<'Actor', MActorDefaultLight> &
72 Use<'Account', MAccountLight> 73 Use<'Account', MAccountLight>
73 74
75export type MChannelHost =
76 MChannelId &
77 Use<'Actor', MActorHost>
78
74// ############################################################################ 79// ############################################################################
75 80
76// Account associations 81// Account associations
diff --git a/server/types/models/video/video.ts b/server/types/models/video/video.ts
index ae23cc30f..92dcbaf59 100644
--- a/server/types/models/video/video.ts
+++ b/server/types/models/video/video.ts
@@ -1,27 +1,28 @@
1import { VideoModel } from '../../../models/video/video'
2import { PickWith, PickWithOpt } from '@shared/core-utils' 1import { PickWith, PickWithOpt } from '@shared/core-utils'
2import { VideoModel } from '../../../models/video/video'
3import { MUserVideoHistoryTime } from '../user/user-video-history'
4import { MScheduleVideoUpdate } from './schedule-video-update'
5import { MTag } from './tag'
6import { MThumbnail } from './thumbnail'
7import { MVideoBlacklist, MVideoBlacklistLight, MVideoBlacklistUnfederated } from './video-blacklist'
8import { MVideoCaptionLanguage, MVideoCaptionLanguageUrl } from './video-caption'
3import { 9import {
4 MChannelAccountDefault, 10 MChannelAccountDefault,
5 MChannelAccountLight, 11 MChannelAccountLight,
6 MChannelAccountSummaryFormattable, 12 MChannelAccountSummaryFormattable,
7 MChannelActor, 13 MChannelActor,
8 MChannelFormattable, 14 MChannelFormattable,
15 MChannelHost,
9 MChannelUserId 16 MChannelUserId
10} from './video-channels' 17} from './video-channels'
11import { MTag } from './tag' 18import { MVideoFile, MVideoFileRedundanciesAll, MVideoFileRedundanciesOpt } from './video-file'
12import { MVideoCaptionLanguage, MVideoCaptionLanguageUrl } from './video-caption' 19import { MVideoLive } from './video-live'
13import { 20import {
14 MStreamingPlaylistFiles, 21 MStreamingPlaylistFiles,
15 MStreamingPlaylistRedundancies, 22 MStreamingPlaylistRedundancies,
16 MStreamingPlaylistRedundanciesAll, 23 MStreamingPlaylistRedundanciesAll,
17 MStreamingPlaylistRedundanciesOpt 24 MStreamingPlaylistRedundanciesOpt
18} from './video-streaming-playlist' 25} from './video-streaming-playlist'
19import { MVideoFile, MVideoFileRedundanciesAll, MVideoFileRedundanciesOpt } from './video-file'
20import { MThumbnail } from './thumbnail'
21import { MVideoBlacklist, MVideoBlacklistLight, MVideoBlacklistUnfederated } from './video-blacklist'
22import { MScheduleVideoUpdate } from './schedule-video-update'
23import { MUserVideoHistoryTime } from '../user/user-video-history'
24import { MVideoLive } from './video-live'
25 26
26type Use<K extends keyof VideoModel, M> = PickWith<VideoModel, K, M> 27type Use<K extends keyof VideoModel, M> = PickWith<VideoModel, K, M>
27 28
@@ -143,6 +144,10 @@ export type MVideoWithChannelActor =
143 MVideo & 144 MVideo &
144 Use<'VideoChannel', MChannelActor> 145 Use<'VideoChannel', MChannelActor>
145 146
147export type MVideoWithHost =
148 MVideo &
149 Use<'VideoChannel', MChannelHost>
150
146export type MVideoFullLight = 151export type MVideoFullLight =
147 MVideo & 152 MVideo &
148 Use<'Thumbnails', MThumbnail[]> & 153 Use<'Thumbnails', MThumbnail[]> &