aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-file.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/video-file.ts')
-rw-r--r--server/models/video/video-file.ts9
1 files changed, 2 insertions, 7 deletions
diff --git a/server/models/video/video-file.ts b/server/models/video/video-file.ts
index 57807cbfd..5a3706259 100644
--- a/server/models/video/video-file.ts
+++ b/server/models/video/video-file.ts
@@ -427,10 +427,8 @@ export class VideoFileModel extends Model {
427 if (!this.Video) this.Video = video as VideoModel 427 if (!this.Video) this.Video = video as VideoModel
428 428
429 if (video.isOwned()) return WEBSERVER.URL + this.getFileStaticPath(video) 429 if (video.isOwned()) return WEBSERVER.URL + this.getFileStaticPath(video)
430 if (this.fileUrl) return this.fileUrl
431 430
432 // Fallback if we don't have a file URL 431 return this.fileUrl
433 return buildRemoteVideoBaseUrl(video, this.getFileStaticPath(video))
434 } 432 }
435 433
436 getFileStaticPath (video: MVideo) { 434 getFileStaticPath (video: MVideo) {
@@ -454,10 +452,7 @@ export class VideoFileModel extends Model {
454 getRemoteTorrentUrl (video: MVideoWithHost) { 452 getRemoteTorrentUrl (video: MVideoWithHost) {
455 if (video.isOwned()) throw new Error(`Video ${video.url} is not a remote video`) 453 if (video.isOwned()) throw new Error(`Video ${video.url} is not a remote video`)
456 454
457 if (this.torrentUrl) return this.torrentUrl 455 return this.torrentUrl
458
459 // Fallback if we don't have a torrent URL
460 return buildRemoteVideoBaseUrl(video, this.getTorrentStaticPath())
461 } 456 }
462 457
463 // We proxify torrent requests so use a local URL 458 // We proxify torrent requests so use a local URL