diff --git a/server/controller/download.controller.js b/server/controller/download.controller.js index 2f57699..a7b25d0 100644 --- a/server/controller/download.controller.js +++ b/server/controller/download.controller.js @@ -21,6 +21,7 @@ async function downloadController(req, res) { const filePath = await fetchDownload(options, listeners); notifyDownloadFinished(filePath); res.send("✅ Téléchargement terminé !"); + } catch (err) { logger.error(`Erreur serveur dans /download : ${err.message}`); res.status(500).send(`❌ ${err.message}`); diff --git a/server/controller/info.controller.js b/server/controller/info.controller.js index d7fb895..72e4a2e 100644 --- a/server/controller/info.controller.js +++ b/server/controller/info.controller.js @@ -39,7 +39,6 @@ async function infoController(req, res){ } - } catch (err) { return res.status(500).send(`❌ ${err.message}`); } diff --git a/server/helpers/parseInfo.js b/server/helpers/parseInfo.js index c084b14..c397493 100644 --- a/server/helpers/parseInfo.js +++ b/server/helpers/parseInfo.js @@ -1,7 +1,5 @@ function parseVideo(data) { - // logger.info(`Avant parse: ${JSON.stringify(data, null, 2)}`); - return { type: "video", // id: data.id, @@ -15,9 +13,7 @@ function parseVideo(data) { } function parsePlaylist(data) { - - // logger.info(`Avant parse: ${JSON.stringify(data, null, 2)}`); - + return { type: "playlist", title: data.title || data.id,