Translate English

This commit is contained in:
MasterAcnolo
2025-11-19 16:48:07 +01:00
parent 69bbcee885
commit ef784dd19c
11 changed files with 64 additions and 44 deletions

View File

@@ -16,15 +16,15 @@ async function downloadController(req, res) {
outputFolder: req.body.savePath || undefined,
};
if (!options.url || !isValidUrl(options.url)) return res.status(400).send("❌ URL invalide !");
if (options.outputFolder && !isSafePath(options.outputFolder)) return res.status(400).send("❌ Chemin de sauvegarde non autorisé.");
if (!options.url || !isValidUrl(options.url)) return res.status(400).send("❌ Invalid URL !");
if (options.outputFolder && !isSafePath(options.outputFolder)) return res.status(400).send("❌ Save Path Not Allowed.");
const filePath = await fetchDownload(options, listeners, speedListeners);
notifyDownloadFinished(filePath);
res.send("✅ Téléchargement terminé !");
res.send("✅ Download Done !");
} catch (err) {
logger.error(`Erreur serveur dans /download : ${err.message}`);
logger.error(`Server Error in /download : ${err.message}`);
res.status(500).send(`${err.message}`);
}
}

View File

@@ -12,9 +12,9 @@ async function infoController(req, res){
/* Si pas d'url ou url invalide*/
if (!url || !isValidUrl(url)) return res.status(400).send("❌ URL invalide ou manquante");
if (!url || !isValidUrl(url)) return res.status(400).send("❌ Invalid URL Or Missing");
logger.info(`Requête /info reçue par le controller. URL: ${url}`);
logger.info(`/Info Request receive by the Info Controller. URL: ${url}`);
if (url.includes("?list")) {
logger.info("Type de contenu: Playlist")
@@ -29,12 +29,12 @@ async function infoController(req, res){
if (data._type === "playlist") {
const playlist = parsePlaylist(data);
logger.info(`Playlist détectée : ${playlist.title} (${playlist.count} vidéos)`);
logger.info(`Playlist : ${playlist.title} (${playlist.count} vidéos)`);
return res.json(playlist);
} else{
const video = parseVideo(data);
logger.info(`Vidéo unique récupérée : ${video.title}`);
logger.info(`Unique Video: ${video.title}`);
return res.json(video);
}