aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-10-27 14:37:04 +0200
committerChocobozzz <chocobozzz@cpy.re>2021-10-29 11:48:21 +0200
commit2760b454a761f6af3138b2fb5f34340772ab0d1e (patch)
tree2b3a2d81478f8b432eb54cce4caa5a760c494627 /shared/models/videos
parente4611b54910d8e7f2b4f8a97ee2d9cc8e1054127 (diff)
downloadPeerTube-2760b454a761f6af3138b2fb5f34340772ab0d1e.tar.gz
PeerTube-2760b454a761f6af3138b2fb5f34340772ab0d1e.tar.zst
PeerTube-2760b454a761f6af3138b2fb5f34340772ab0d1e.zip
Deprecate filter video query
Introduce include and isLocal instead
Diffstat (limited to 'shared/models/videos')
-rw-r--r--shared/models/videos/index.ts3
-rw-r--r--shared/models/videos/video-filter.type.ts (renamed from shared/models/videos/video-query.type.ts)0
-rw-r--r--shared/models/videos/video-include.enum.ts7
-rw-r--r--shared/models/videos/video.model.ts20
4 files changed, 21 insertions, 9 deletions
diff --git a/shared/models/videos/index.ts b/shared/models/videos/index.ts
index 733c433a0..3d3eedcc6 100644
--- a/shared/models/videos/index.ts
+++ b/shared/models/videos/index.ts
@@ -19,7 +19,8 @@ export * from './video-file-metadata.model'
19export * from './video-file.model' 19export * from './video-file.model'
20 20
21export * from './video-privacy.enum' 21export * from './video-privacy.enum'
22export * from './video-query.type' 22export * from './video-filter.type'
23export * from './video-include.enum'
23export * from './video-rate.type' 24export * from './video-rate.type'
24export * from './video-resolution.enum' 25export * from './video-resolution.enum'
25 26
diff --git a/shared/models/videos/video-query.type.ts b/shared/models/videos/video-filter.type.ts
index e641a401c..e641a401c 100644
--- a/shared/models/videos/video-query.type.ts
+++ b/shared/models/videos/video-filter.type.ts
diff --git a/shared/models/videos/video-include.enum.ts b/shared/models/videos/video-include.enum.ts
new file mode 100644
index 000000000..fa720b348
--- /dev/null
+++ b/shared/models/videos/video-include.enum.ts
@@ -0,0 +1,7 @@
1export const enum VideoInclude {
2 NONE = 0,
3 NOT_PUBLISHED_STATE = 1 << 0,
4 HIDDEN_PRIVACY = 1 << 1,
5 BLACKLISTED = 1 << 2,
6 BLOCKED_OWNER = 1 << 3
7}
diff --git a/shared/models/videos/video.model.ts b/shared/models/videos/video.model.ts
index 4a7e399a2..dadde38af 100644
--- a/shared/models/videos/video.model.ts
+++ b/shared/models/videos/video.model.ts
@@ -43,13 +43,6 @@ export interface Video {
43 dislikes: number 43 dislikes: number
44 nsfw: boolean 44 nsfw: boolean
45 45
46 waitTranscoding?: boolean
47 state?: VideoConstant<VideoState>
48 scheduledUpdate?: VideoScheduleUpdate
49
50 blacklisted?: boolean
51 blacklistedReason?: string
52
53 account: AccountSummary 46 account: AccountSummary
54 channel: VideoChannelSummary 47 channel: VideoChannelSummary
55 48
@@ -58,6 +51,17 @@ export interface Video {
58 } 51 }
59 52
60 pluginData?: any 53 pluginData?: any
54
55 // Additional attributes dependending on the query
56 waitTranscoding?: boolean
57 state?: VideoConstant<VideoState>
58 scheduledUpdate?: VideoScheduleUpdate
59
60 blacklisted?: boolean
61 blacklistedReason?: string
62
63 blockedOwner?: boolean
64 blockedServer?: boolean
61} 65}
62 66
63export interface VideoDetails extends Video { 67export interface VideoDetails extends Video {
@@ -70,7 +74,7 @@ export interface VideoDetails extends Video {
70 commentsEnabled: boolean 74 commentsEnabled: boolean
71 downloadEnabled: boolean 75 downloadEnabled: boolean
72 76
73 // Not optional in details (unlike in Video) 77 // Not optional in details (unlike in parent Video)
74 waitTranscoding: boolean 78 waitTranscoding: boolean
75 state: VideoConstant<VideoState> 79 state: VideoConstant<VideoState>
76 80