From 454c20fa7cdb05eba7f1be3c83389b54807af0b3 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Fri, 15 Jan 2021 15:56:56 +0100 Subject: stricter youtubedl format selectors (#3516) * stricter youtubedl format selectors make sure selectors avoid av1, and otherwise match as closely to the maximum resolution enabled for transcoding * add support for merge formats in youtubedl * avoid vp9.2 in youtubedl to avoid any HDR * move getEnabledResolutions, safer replace of imported extension * add test for youtube-dl selectors --- server/middlewares/validators/videos/video-imports.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/middlewares/validators/videos') diff --git a/server/middlewares/validators/videos/video-imports.ts b/server/middlewares/validators/videos/video-imports.ts index 0d41933a6..c53af3861 100644 --- a/server/middlewares/validators/videos/video-imports.ts +++ b/server/middlewares/validators/videos/video-imports.ts @@ -43,7 +43,7 @@ const videoImportAddValidator = getCommonVideoEditAttributes().concat([ if (areValidationErrors(req, res)) return cleanUpReqFiles(req) - if (req.body.targetUrl && CONFIG.IMPORT.VIDEOS.HTTP.ENABLED !== true) { + if (CONFIG.IMPORT.VIDEOS.HTTP.ENABLED !== true && req.body.targetUrl) { cleanUpReqFiles(req) return res.status(HttpStatusCode.CONFLICT_409) .json({ error: 'HTTP import is not enabled on this instance.' }) -- cgit v1.2.3