aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/src/app/shared/video/modals/video-download.component.ts2
-rw-r--r--client/src/app/shared/video/video.service.ts30
2 files changed, 20 insertions, 12 deletions
diff --git a/client/src/app/shared/video/modals/video-download.component.ts b/client/src/app/shared/video/modals/video-download.component.ts
index 5849ee458..712740086 100644
--- a/client/src/app/shared/video/modals/video-download.component.ts
+++ b/client/src/app/shared/video/modals/video-download.component.ts
@@ -59,7 +59,7 @@ export class VideoDownloadComponent {
59 return 59 return
60 } 60 }
61 61
62 const suffix = this.video.privacy.id === VideoPrivacy.PRIVATE 62 const suffix = this.video.privacy.id === VideoPrivacy.PRIVATE || this.video.privacy.id === VideoPrivacy.INTERNAL
63 ? '?access_token=' + this.auth.getAccessToken() 63 ? '?access_token=' + this.auth.getAccessToken()
64 : '' 64 : ''
65 65
diff --git a/client/src/app/shared/video/video.service.ts b/client/src/app/shared/video/video.service.ts
index 45366e3e3..b0fa55966 100644
--- a/client/src/app/shared/video/video.service.ts
+++ b/client/src/app/shared/video/video.service.ts
@@ -332,18 +332,26 @@ export class VideoService implements VideosProvider {
332 } 332 }
333 333
334 explainedPrivacyLabels (privacies: VideoConstant<VideoPrivacy>[]) { 334 explainedPrivacyLabels (privacies: VideoConstant<VideoPrivacy>[]) {
335 const newPrivacies = privacies.slice() 335 const base = [
336 336 {
337 const privatePrivacy = newPrivacies.find(p => p.id === VideoPrivacy.PRIVATE) 337 id: VideoPrivacy.PRIVATE,
338 if (privatePrivacy) privatePrivacy.label = this.i18n('Only I can see this video') 338 label: this.i18n('Only I can see this video')
339 339 },
340 const unlistedPrivacy = newPrivacies.find(p => p.id === VideoPrivacy.UNLISTED) 340 {
341 if (unlistedPrivacy) unlistedPrivacy.label = this.i18n('Only people with the private link can see this video') 341 id: VideoPrivacy.UNLISTED,
342 342 label: this.i18n('Only people with the private link can see this video')
343 const publicPrivacy = newPrivacies.find(p => p.id === VideoPrivacy.PUBLIC) 343 },
344 if (publicPrivacy) publicPrivacy.label = this.i18n('Anyone can see this video') 344 {
345 id: VideoPrivacy.PUBLIC,
346 label: this.i18n('Anyone can see this video')
347 },
348 {
349 id: VideoPrivacy.INTERNAL,
350 label: this.i18n('Only users of this instance can see this video')
351 }
352 ]
345 353
346 return privacies 354 return base.filter(o => !!privacies.find(p => p.id === o.id))
347 } 355 }
348 356
349 private setVideoRate (id: number, rateType: UserVideoRateType) { 357 private setVideoRate (id: number, rateType: UserVideoRateType) {