aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/webtorrent.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/webtorrent.ts')
-rw-r--r--server/helpers/webtorrent.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/server/helpers/webtorrent.ts b/server/helpers/webtorrent.ts
index 88bdb16b6..6d87c74f7 100644
--- a/server/helpers/webtorrent.ts
+++ b/server/helpers/webtorrent.ts
@@ -164,7 +164,10 @@ function generateMagnetUri (
164) { 164) {
165 const xs = videoFile.getTorrentUrl() 165 const xs = videoFile.getTorrentUrl()
166 const announce = trackerUrls 166 const announce = trackerUrls
167 let urlList = [ videoFile.getFileUrl(video) ] 167
168 let urlList = video.requiresAuth(video.uuid)
169 ? []
170 : [ videoFile.getFileUrl(video) ]
168 171
169 const redundancies = videoFile.RedundancyVideos 172 const redundancies = videoFile.RedundancyVideos
170 if (isArray(redundancies)) urlList = urlList.concat(redundancies.map(r => r.fileUrl)) 173 if (isArray(redundancies)) urlList = urlList.concat(redundancies.map(r => r.fileUrl))
@@ -240,6 +243,8 @@ function buildAnnounceList () {
240} 243}
241 244
242function buildUrlList (video: MVideo, videoFile: MVideoFile) { 245function buildUrlList (video: MVideo, videoFile: MVideoFile) {
246 if (video.requiresAuth(video.uuid)) return []
247
243 return [ videoFile.getFileUrl(video) ] 248 return [ videoFile.getFileUrl(video) ]
244} 249}
245 250