aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/download.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/download.ts')
-rw-r--r--server/controllers/download.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/download.ts b/server/controllers/download.ts
index 8da710669..43d525f83 100644
--- a/server/controllers/download.ts
+++ b/server/controllers/download.ts
@@ -85,7 +85,7 @@ async function downloadVideoFile (req: express.Request, res: express.Response) {
85 return res.redirect(videoFile.getObjectStorageUrl()) 85 return res.redirect(videoFile.getObjectStorageUrl())
86 } 86 }
87 87
88 await VideoPathManager.Instance.makeAvailableVideoFile(video, videoFile, path => { 88 await VideoPathManager.Instance.makeAvailableVideoFile(videoFile.withVideoOrPlaylist(video), path => {
89 const filename = `${video.name}-${videoFile.resolution}p${videoFile.extname}` 89 const filename = `${video.name}-${videoFile.resolution}p${videoFile.extname}`
90 90
91 return res.download(path, filename) 91 return res.download(path, filename)
@@ -119,7 +119,7 @@ async function downloadHLSVideoFile (req: express.Request, res: express.Response
119 return res.redirect(videoFile.getObjectStorageUrl()) 119 return res.redirect(videoFile.getObjectStorageUrl())
120 } 120 }
121 121
122 await VideoPathManager.Instance.makeAvailableVideoFile(streamingPlaylist, videoFile, path => { 122 await VideoPathManager.Instance.makeAvailableVideoFile(videoFile.withVideoOrPlaylist(streamingPlaylist), path => {
123 const filename = `${video.name}-${videoFile.resolution}p-${streamingPlaylist.getStringType()}${videoFile.extname}` 123 const filename = `${video.name}-${videoFile.resolution}p-${streamingPlaylist.getStringType()}${videoFile.extname}`
124 124
125 return res.download(path, filename) 125 return res.download(path, filename)