X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fcontrollers%2Fapi%2Fvideos%2Fimport.ts;h=4265f3217d0b7fe5e7349de3adabd18c1f3ebfb5;hb=731a32e334fc9eef63a97875d6290ceb34a94ce4;hp=5f90e430888ff538c468b0d50c29b4b761746352;hpb=52d1477ac45cc7732bcd269fb53ed1d8192996bc;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/controllers/api/videos/import.ts b/server/controllers/api/videos/import.ts index 5f90e4308..4265f3217 100644 --- a/server/controllers/api/videos/import.ts +++ b/server/controllers/api/videos/import.ts @@ -158,7 +158,11 @@ async function addYoutubeDLImport (req: express.Request, res: express.Response) // Process video thumbnail from url if processing from request.files failed if (!thumbnailModel && youtubeDLInfo.thumbnailUrl) { - thumbnailModel = await processThumbnailFromUrl(youtubeDLInfo.thumbnailUrl, video) + try { + thumbnailModel = await processThumbnailFromUrl(youtubeDLInfo.thumbnailUrl, video) + } catch (err) { + logger.warn('Cannot process thumbnail %s from youtubedl.', youtubeDLInfo.thumbnailUrl, { err }) + } } // Process video preview from request.files @@ -166,7 +170,11 @@ async function addYoutubeDLImport (req: express.Request, res: express.Response) // Process video preview from url if processing from request.files failed if (!previewModel && youtubeDLInfo.thumbnailUrl) { - previewModel = await processPreviewFromUrl(youtubeDLInfo.thumbnailUrl, video) + try { + previewModel = await processPreviewFromUrl(youtubeDLInfo.thumbnailUrl, video) + } catch (err) { + logger.warn('Cannot process preview %s from youtubedl.', youtubeDLInfo.thumbnailUrl, { err }) + } } const videoImport = await insertIntoDB({