diff options
Diffstat (limited to 'client/src/app/shared/shared-video-miniature/video-download.component.ts')
-rw-r--r-- | client/src/app/shared/shared-video-miniature/video-download.component.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/client/src/app/shared/shared-video-miniature/video-download.component.ts b/client/src/app/shared/shared-video-miniature/video-download.component.ts index 70b27b105..90f4daf7c 100644 --- a/client/src/app/shared/shared-video-miniature/video-download.component.ts +++ b/client/src/app/shared/shared-video-miniature/video-download.component.ts | |||
@@ -116,7 +116,7 @@ export class VideoDownloadComponent { | |||
116 | const file = this.videoFile | 116 | const file = this.videoFile |
117 | if (!file) return | 117 | if (!file) return |
118 | 118 | ||
119 | const suffix = this.video.privacy.id === VideoPrivacy.PRIVATE || this.video.privacy.id === VideoPrivacy.INTERNAL | 119 | const suffix = this.isConfidentialVideo() |
120 | ? '?access_token=' + this.auth.getAccessToken() | 120 | ? '?access_token=' + this.auth.getAccessToken() |
121 | : '' | 121 | : '' |
122 | 122 | ||
@@ -129,6 +129,10 @@ export class VideoDownloadComponent { | |||
129 | } | 129 | } |
130 | } | 130 | } |
131 | 131 | ||
132 | isConfidentialVideo () { | ||
133 | return this.video.privacy.id === VideoPrivacy.PRIVATE || this.video.privacy.id === VideoPrivacy.INTERNAL | ||
134 | } | ||
135 | |||
132 | getSubtitlesLink () { | 136 | getSubtitlesLink () { |
133 | return window.location.origin + this.videoCaptions.find(caption => caption.language.id === this.subtitleLanguageId).captionPath | 137 | return window.location.origin + this.videoCaptions.find(caption => caption.language.id === this.subtitleLanguageId).captionPath |
134 | } | 138 | } |