YT-DLP Maj Automatique

This commit is contained in:
MasterAcnolo
2025-09-27 11:10:34 +02:00
parent 7b6e48b09e
commit b92ffebdb4
4 changed files with 12 additions and 4 deletions

View File

@@ -50,8 +50,8 @@
"to": "confirm-icon.png" "to": "confirm-icon.png"
}, },
{ {
"from": "ressources/yt-dlp 2025.09.23.exe", "from": "ressources/yt-dlp.exe",
"to": "yt-dlp 2025.09.23.exe" "to": "yt-dlp.exe"
}, },
{ {
"from": "ressources/ffmpeg.exe", "from": "ressources/ffmpeg.exe",

View File

@@ -23,7 +23,15 @@ const logger = require("../logger").logger;
// Path vers le fichier exécutable yt-dlp (outil tiers pour le téléchargement) // Path vers le fichier exécutable yt-dlp (outil tiers pour le téléchargement)
// const ytDlpPath = path.join(process.resourcesPath, '../../yt-dlp.exe'); // const ytDlpPath = path.join(process.resourcesPath, '../../yt-dlp.exe');
const ytDlpPath = path.join(process.resourcesPath, 'yt-dlp 2025.09.23.exe'); const ytDlpPath = path.join(process.resourcesPath, 'yt-dlp.exe');
execFile(ytDlpPath, ["-U"], (err, stdout, stderr) => {
if (err) {
logger.error("Erreur update yt-dlp:", err);
return;
}
logger.info(`Update yt-dlp : ${stdout}`);
});
router.post("/", (req, res) => { router.post("/", (req, res) => {
try { try {

View File

@@ -24,7 +24,7 @@ const fs = require("fs");
const { logger } = require("../logger"); // On récupère ton logger Winston const { logger } = require("../logger"); // On récupère ton logger Winston
// Path absolu vers l'exécutable yt-dlp // Path absolu vers l'exécutable yt-dlp
const ytDlpPath = path.join(__dirname, '../../ressources/yt-dlp 2025.09.23.exe'); const ytDlpPath = path.join(__dirname, '../../ressources/yt-dlp.exe');
// Vérification que yt-dlp.exe existe bien au lancement du module // Vérification que yt-dlp.exe existe bien au lancement du module
if (!fs.existsSync(ytDlpPath)) { if (!fs.existsSync(ytDlpPath)) {