mirror of
https://github.com/MasterAcnolo/Freedom-Loader.git
synced 2026-07-29 18:25:47 +02:00
Clean Code
This commit is contained in:
@@ -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}`);
|
||||||
|
|||||||
@@ -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}`);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user