aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-video-miniature
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-video-miniature')
-rw-r--r--client/src/app/shared/shared-video-miniature/video-filters.model.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/client/src/app/shared/shared-video-miniature/video-filters.model.ts b/client/src/app/shared/shared-video-miniature/video-filters.model.ts
index 5ad7cf3f7..982880b0e 100644
--- a/client/src/app/shared/shared-video-miniature/video-filters.model.ts
+++ b/client/src/app/shared/shared-video-miniature/video-filters.model.ts
@@ -1,6 +1,6 @@
1import { intoArray, toBoolean } from '@app/helpers' 1import { intoArray, toBoolean } from '@app/helpers'
2import { AttributesOnly } from '@shared/core-utils' 2import { AttributesOnly, getAllPrivacies } from '@shared/core-utils'
3import { BooleanBothQuery, NSFWPolicyType, VideoInclude, VideoSortField } from '@shared/models' 3import { BooleanBothQuery, NSFWPolicyType, VideoInclude, VideoPrivacy, VideoSortField } from '@shared/models'
4 4
5type VideoFiltersKeys = { 5type VideoFiltersKeys = {
6 [ id in keyof AttributesOnly<VideoFilters> ]: any 6 [ id in keyof AttributesOnly<VideoFilters> ]: any
@@ -198,13 +198,15 @@ export class VideoFilters {
198 toVideosAPIObject () { 198 toVideosAPIObject () {
199 let isLocal: boolean 199 let isLocal: boolean
200 let include: VideoInclude 200 let include: VideoInclude
201 let privacyOneOf: VideoPrivacy[]
201 202
202 if (this.scope === 'local') { 203 if (this.scope === 'local') {
203 isLocal = true 204 isLocal = true
204 } 205 }
205 206
206 if (this.allVideos) { 207 if (this.allVideos) {
207 include = VideoInclude.NOT_PUBLISHED_STATE | VideoInclude.HIDDEN_PRIVACY 208 include = VideoInclude.NOT_PUBLISHED_STATE
209 privacyOneOf = getAllPrivacies()
208 } 210 }
209 211
210 let isLive: boolean 212 let isLive: boolean
@@ -219,6 +221,7 @@ export class VideoFilters {
219 search: this.search, 221 search: this.search,
220 isLocal, 222 isLocal,
221 include, 223 include,
224 privacyOneOf,
222 isLive 225 isLive
223 } 226 }
224 } 227 }