]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-video-miniature/video-download.component.ts
Add warning in download modal if needed
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-video-miniature / video-download.component.ts
index 70b27b105437dfb780a8ff6243eb3eaccf0bd793..90f4daf7c9d80ab4986b52966eb5822c80292dcd 100644 (file)
@@ -116,7 +116,7 @@ export class VideoDownloadComponent {
     const file = this.videoFile
     if (!file) return
 
-    const suffix = this.video.privacy.id === VideoPrivacy.PRIVATE || this.video.privacy.id === VideoPrivacy.INTERNAL
+    const suffix = this.isConfidentialVideo()
       ? '?access_token=' + this.auth.getAccessToken()
       : ''
 
@@ -129,6 +129,10 @@ export class VideoDownloadComponent {
     }
   }
 
+  isConfidentialVideo () {
+    return this.video.privacy.id === VideoPrivacy.PRIVATE || this.video.privacy.id === VideoPrivacy.INTERNAL
+  }
+
   getSubtitlesLink () {
     return window.location.origin + this.videoCaptions.find(caption => caption.language.id === this.subtitleLanguageId).captionPath
   }