aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/videos')
-rw-r--r--server/controllers/api/videos/import.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/server/controllers/api/videos/import.ts b/server/controllers/api/videos/import.ts
index 82e084c54..9702e219a 100644
--- a/server/controllers/api/videos/import.ts
+++ b/server/controllers/api/videos/import.ts
@@ -146,9 +146,10 @@ async function addYoutubeDLImport (req: express.Request, res: express.Response)
146 } catch (err) { 146 } catch (err) {
147 logger.info('Cannot fetch information from import for URL %s.', targetUrl, { err }) 147 logger.info('Cannot fetch information from import for URL %s.', targetUrl, { err })
148 148
149 return res.status(HttpStatusCode.BAD_REQUEST_400).json({ 149 return res.status(HttpStatusCode.BAD_REQUEST_400)
150 error: 'Cannot fetch remote information of this URL.' 150 .json({
151 }).end() 151 error: 'Cannot fetch remote information of this URL.'
152 })
152 } 153 }
153 154
154 const video = buildVideo(res.locals.videoChannel.id, body, youtubeDLInfo) 155 const video = buildVideo(res.locals.videoChannel.id, body, youtubeDLInfo)
@@ -219,9 +220,8 @@ async function addYoutubeDLImport (req: express.Request, res: express.Response)
219 videoImportId: videoImport.id, 220 videoImportId: videoImport.id,
220 generateThumbnail: !thumbnailModel, 221 generateThumbnail: !thumbnailModel,
221 generatePreview: !previewModel, 222 generatePreview: !previewModel,
222 fileExt: youtubeDLInfo.fileExt 223 fileExt: `.${youtubeDLInfo.ext || 'mp4'}`,
223 ? `.${youtubeDLInfo.fileExt}` 224 mergeExt: youtubeDLInfo.mergeExt ? `.${youtubeDLInfo.mergeExt}` : ''
224 : '.mp4'
225 } 225 }
226 await JobQueue.Instance.createJobWithPromise({ type: 'video-import', payload }) 226 await JobQueue.Instance.createJobWithPromise({ type: 'video-import', payload })
227 227