diff options
author | Chocobozzz <me@florianbigard.com> | 2020-06-23 14:10:17 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-06-23 16:00:49 +0200 |
commit | 67ed6552b831df66713bac9e672738796128d33f (patch) | |
tree | 59c97d41e0b49d75a90aa3de987968ab9b1ff447 /shared/models/videos | |
parent | 0c4bacbff53bc732f5a2677d62a6ead7752e2405 (diff) | |
download | PeerTube-67ed6552b831df66713bac9e672738796128d33f.tar.gz PeerTube-67ed6552b831df66713bac9e672738796128d33f.tar.zst PeerTube-67ed6552b831df66713bac9e672738796128d33f.zip |
Reorganize client shared modules
Diffstat (limited to 'shared/models/videos')
-rw-r--r-- | shared/models/videos/abuse/index.ts | 5 | ||||
-rw-r--r-- | shared/models/videos/blacklist/index.ts | 3 | ||||
-rw-r--r-- | shared/models/videos/caption/index.ts | 2 | ||||
-rw-r--r-- | shared/models/videos/channel/index.ts | 3 | ||||
-rw-r--r-- | shared/models/videos/import/index.ts | 3 | ||||
-rw-r--r-- | shared/models/videos/index.ts | 63 | ||||
-rw-r--r-- | shared/models/videos/playlist/index.ts | 10 | ||||
-rw-r--r-- | shared/models/videos/rate/index.ts | 5 | ||||
-rw-r--r-- | shared/models/videos/video-file-metadata.ts | 4 | ||||
-rw-r--r-- | shared/models/videos/video-sort-field.type.ts | 8 |
10 files changed, 71 insertions, 35 deletions
diff --git a/shared/models/videos/abuse/index.ts b/shared/models/videos/abuse/index.ts new file mode 100644 index 000000000..bdeef1dad --- /dev/null +++ b/shared/models/videos/abuse/index.ts | |||
@@ -0,0 +1,5 @@ | |||
1 | export * from './video-abuse-create.model' | ||
2 | export * from './video-abuse-state.model' | ||
3 | export * from './video-abuse-update.model' | ||
4 | export * from './video-abuse-video-is.type' | ||
5 | export * from './video-abuse.model' | ||
diff --git a/shared/models/videos/blacklist/index.ts b/shared/models/videos/blacklist/index.ts new file mode 100644 index 000000000..66082be34 --- /dev/null +++ b/shared/models/videos/blacklist/index.ts | |||
@@ -0,0 +1,3 @@ | |||
1 | export * from './video-blacklist.model' | ||
2 | export * from './video-blacklist-create.model' | ||
3 | export * from './video-blacklist-update.model' | ||
diff --git a/shared/models/videos/caption/index.ts b/shared/models/videos/caption/index.ts new file mode 100644 index 000000000..2a5ff512d --- /dev/null +++ b/shared/models/videos/caption/index.ts | |||
@@ -0,0 +1,2 @@ | |||
1 | export * from './video-caption.model' | ||
2 | export * from './video-caption-update.model' | ||
diff --git a/shared/models/videos/channel/index.ts b/shared/models/videos/channel/index.ts new file mode 100644 index 000000000..9dbaa42da --- /dev/null +++ b/shared/models/videos/channel/index.ts | |||
@@ -0,0 +1,3 @@ | |||
1 | export * from './video-channel-create.model' | ||
2 | export * from './video-channel-update.model' | ||
3 | export * from './video-channel.model' | ||
diff --git a/shared/models/videos/import/index.ts b/shared/models/videos/import/index.ts new file mode 100644 index 000000000..8884ee8f2 --- /dev/null +++ b/shared/models/videos/import/index.ts | |||
@@ -0,0 +1,3 @@ | |||
1 | export * from './video-import-create.model' | ||
2 | export * from './video-import-state.enum' | ||
3 | export * from './video-import.model' | ||
diff --git a/shared/models/videos/index.ts b/shared/models/videos/index.ts index 58bd1ebd7..e1d96b40a 100644 --- a/shared/models/videos/index.ts +++ b/shared/models/videos/index.ts | |||
@@ -1,41 +1,38 @@ | |||
1 | export * from './rate/user-video-rate-update.model' | 1 | export * from './abuse' |
2 | export * from './rate/user-video-rate.model' | 2 | export * from './blacklist' |
3 | export * from './rate/account-video-rate.model' | 3 | export * from './caption' |
4 | export * from './rate/user-video-rate.type' | 4 | export * from './channel' |
5 | export * from './abuse/video-abuse-state.model' | 5 | export * from './import' |
6 | export * from './abuse/video-abuse-create.model' | 6 | export * from './playlist' |
7 | export * from './abuse/video-abuse-reason.model' | 7 | export * from './rate' |
8 | export * from './abuse/video-abuse.model' | 8 | |
9 | export * from './abuse/video-abuse-update.model' | 9 | export * from './nsfw-policy.type' |
10 | export * from './blacklist/video-blacklist.model' | 10 | |
11 | export * from './blacklist/video-blacklist-create.model' | 11 | export * from './thumbnail.type' |
12 | export * from './blacklist/video-blacklist-update.model' | 12 | |
13 | export * from './channel/video-channel-create.model' | 13 | export * from './video-change-ownership-accept.model' |
14 | export * from './channel/video-channel-update.model' | ||
15 | export * from './channel/video-channel.model' | ||
16 | export * from './playlist/video-playlist-create.model' | ||
17 | export * from './playlist/video-playlist-element-create.model' | ||
18 | export * from './playlist/video-playlist-element-update.model' | ||
19 | export * from './playlist/video-playlist-privacy.model' | ||
20 | export * from './playlist/video-playlist-type.model' | ||
21 | export * from './playlist/video-playlist-update.model' | ||
22 | export * from './playlist/video-playlist.model' | ||
23 | export * from './playlist/video-playlist-element.model' | ||
24 | export * from './video-change-ownership.model' | ||
25 | export * from './video-change-ownership-create.model' | 14 | export * from './video-change-ownership-create.model' |
15 | export * from './video-change-ownership.model' | ||
16 | |||
17 | export * from './video-comment.model' | ||
18 | export * from './video-constant.model' | ||
26 | export * from './video-create.model' | 19 | export * from './video-create.model' |
20 | export * from './video-file-metadata' | ||
27 | export * from './video-file.model' | 21 | export * from './video-file.model' |
22 | |||
28 | export * from './video-privacy.enum' | 23 | export * from './video-privacy.enum' |
24 | export * from './video-query.type' | ||
29 | export * from './video-rate.type' | 25 | export * from './video-rate.type' |
30 | export * from './video-resolution.enum' | 26 | export * from './video-resolution.enum' |
31 | export * from './video-update.model' | 27 | |
32 | export * from './video.model' | 28 | export * from './video-schedule-update.model' |
33 | export * from './video-query.type' | 29 | export * from './video-sort-field.type' |
34 | export * from './video-state.enum' | 30 | export * from './video-state.enum' |
31 | |||
32 | export * from './video-streaming-playlist.model' | ||
33 | export * from './video-streaming-playlist.type' | ||
34 | |||
35 | export * from './video-transcoding-fps.model' | 35 | export * from './video-transcoding-fps.model' |
36 | export * from './caption/video-caption.model' | 36 | |
37 | export * from './caption/video-caption-update.model' | 37 | export * from './video-update.model' |
38 | export * from './import/video-import-create.model' | 38 | export * from './video.model' |
39 | export * from './import/video-import-state.enum' | ||
40 | export * from './import/video-import.model' | ||
41 | export * from './video-constant.model' | ||
diff --git a/shared/models/videos/playlist/index.ts b/shared/models/videos/playlist/index.ts new file mode 100644 index 000000000..99f7e9bab --- /dev/null +++ b/shared/models/videos/playlist/index.ts | |||
@@ -0,0 +1,10 @@ | |||
1 | export * from './video-exist-in-playlist.model' | ||
2 | export * from './video-playlist-create.model' | ||
3 | export * from './video-playlist-element-create.model' | ||
4 | export * from './video-playlist-element-update.model' | ||
5 | export * from './video-playlist-element.model' | ||
6 | export * from './video-playlist-privacy.model' | ||
7 | export * from './video-playlist-reorder.model' | ||
8 | export * from './video-playlist-type.model' | ||
9 | export * from './video-playlist-update.model' | ||
10 | export * from './video-playlist.model' | ||
diff --git a/shared/models/videos/rate/index.ts b/shared/models/videos/rate/index.ts new file mode 100644 index 000000000..06aa691bd --- /dev/null +++ b/shared/models/videos/rate/index.ts | |||
@@ -0,0 +1,5 @@ | |||
1 | |||
2 | export * from './user-video-rate-update.model' | ||
3 | export * from './user-video-rate.model' | ||
4 | export * from './account-video-rate.model' | ||
5 | export * from './user-video-rate.type' | ||
diff --git a/shared/models/videos/video-file-metadata.ts b/shared/models/videos/video-file-metadata.ts index 15683cacf..010bf7cf5 100644 --- a/shared/models/videos/video-file-metadata.ts +++ b/shared/models/videos/video-file-metadata.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { FfprobeData } from "fluent-ffmpeg" | 1 | import { FfprobeData } from 'fluent-ffmpeg' |
2 | import { DeepOmit } from "@server/models/utils" | 2 | import { DeepOmit } from '../../core-utils' |
3 | 3 | ||
4 | export type VideoFileMetadataModel = DeepOmit<FfprobeData, 'filename'> | 4 | export type VideoFileMetadataModel = DeepOmit<FfprobeData, 'filename'> |
5 | 5 | ||
diff --git a/shared/models/videos/video-sort-field.type.ts b/shared/models/videos/video-sort-field.type.ts new file mode 100644 index 000000000..f2e70f5fa --- /dev/null +++ b/shared/models/videos/video-sort-field.type.ts | |||
@@ -0,0 +1,8 @@ | |||
1 | export type VideoSortField = | ||
2 | 'name' | '-name' | | ||
3 | 'duration' | '-duration' | | ||
4 | 'publishedAt' | '-publishedAt' | | ||
5 | 'createdAt' | '-createdAt' | | ||
6 | 'views' | '-views' | | ||
7 | 'likes' | '-likes' | | ||
8 | 'trending' | '-trending' | ||