diff options
author | Chocobozzz <me@florianbigard.com> | 2021-11-18 14:35:08 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-11-18 15:20:57 +0100 |
commit | ad5db1044c8599eaaaa2a578b350777ae996b068 (patch) | |
tree | 3e003cccf021152405d49b21c6c91b703c8ae96c /server/controllers/download.ts | |
parent | b46cf4b920984492df598c1b61179acfc7f6f22e (diff) | |
download | PeerTube-ad5db1044c8599eaaaa2a578b350777ae996b068.tar.gz PeerTube-ad5db1044c8599eaaaa2a578b350777ae996b068.tar.zst PeerTube-ad5db1044c8599eaaaa2a578b350777ae996b068.zip |
Add ability to run transcoding jobs
Diffstat (limited to 'server/controllers/download.ts')
-rw-r--r-- | server/controllers/download.ts | 4 |
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) |