diff options
author | Chocobozzz <me@florianbigard.com> | 2021-03-24 17:06:50 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-03-24 18:18:40 +0100 |
commit | 51294901cf2be31d4f9cd846bf5534c9982c4b6f (patch) | |
tree | c84f10f8c040c3f803a2f411ece5de55d1ac90ad /client/src/app/shared/shared-video-miniature/video-download.component.ts | |
parent | e6ea0cac4473037df16437a4a128aa6d76a1cfdc (diff) | |
download | PeerTube-51294901cf2be31d4f9cd846bf5534c9982c4b6f.tar.gz PeerTube-51294901cf2be31d4f9cd846bf5534c9982c4b6f.tar.zst PeerTube-51294901cf2be31d4f9cd846bf5534c9982c4b6f.zip |
Add warning in download modal if needed
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 | } |