Clean Code

This commit is contained in:
MasterAcnolo
2025-11-15 23:54:41 +01:00
parent e3845e1849
commit 3e9c545952
3 changed files with 2 additions and 6 deletions

View File

@@ -21,6 +21,7 @@ async function downloadController(req, res) {
const filePath = await fetchDownload(options, listeners); const filePath = await fetchDownload(options, listeners);
notifyDownloadFinished(filePath); notifyDownloadFinished(filePath);
res.send("✅ Téléchargement terminé !"); res.send("✅ Téléchargement terminé !");
} catch (err) { } catch (err) {
logger.error(`Erreur serveur dans /download : ${err.message}`); logger.error(`Erreur serveur dans /download : ${err.message}`);
res.status(500).send(`${err.message}`); res.status(500).send(`${err.message}`);

View File

@@ -39,7 +39,6 @@ async function infoController(req, res){
} }
} catch (err) { } catch (err) {
return res.status(500).send(`${err.message}`); return res.status(500).send(`${err.message}`);
} }

View File

@@ -1,7 +1,5 @@
function parseVideo(data) { function parseVideo(data) {
// logger.info(`Avant parse: ${JSON.stringify(data, null, 2)}`);
return { return {
type: "video", type: "video",
// id: data.id, // id: data.id,
@@ -16,8 +14,6 @@ function parseVideo(data) {
function parsePlaylist(data) { function parsePlaylist(data) {
// logger.info(`Avant parse: ${JSON.stringify(data, null, 2)}`);
return { return {
type: "playlist", type: "playlist",
title: data.title || data.id, title: data.title || data.id,