aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-main')
-rw-r--r--client/src/app/shared/shared-main/video/video.service.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/client/src/app/shared/shared-main/video/video.service.ts b/client/src/app/shared/shared-main/video/video.service.ts
index 1c1d06291..49d6fc1c7 100644
--- a/client/src/app/shared/shared-main/video/video.service.ts
+++ b/client/src/app/shared/shared-main/video/video.service.ts
@@ -404,6 +404,18 @@ export class VideoService implements VideosProvider {
404 } 404 }
405 } 405 }
406 406
407 getHighestAvailablePrivacy (serverPrivacies: VideoConstant<VideoPrivacy>[]) {
408 const order = [ VideoPrivacy.PRIVATE, VideoPrivacy.INTERNAL, VideoPrivacy.UNLISTED, VideoPrivacy.PUBLIC ]
409
410 for (const privacy of order) {
411 if (serverPrivacies.find(p => p.id === privacy)) {
412 return privacy
413 }
414 }
415
416 throw new Error('No highest privacy available')
417 }
418
407 nsfwPolicyToParam (nsfwPolicy: NSFWPolicyType) { 419 nsfwPolicyToParam (nsfwPolicy: NSFWPolicyType) {
408 return nsfwPolicy === 'do_not_list' 420 return nsfwPolicy === 'do_not_list'
409 ? 'false' 421 ? 'false'