Using MVC Model + AutoDeteck Package + Fix Download/Info

This commit is contained in:
MasterAcnolo
2025-11-15 15:06:19 +01:00
parent e6419a9759
commit c9a48ec64c
16 changed files with 313 additions and 227 deletions

View File

@@ -5,19 +5,22 @@ const config = require("../../config");
let userYtDlp;
let ffmpegPath;
let denoPath;
const sourceYtDlp = path.join(process.resourcesPath, "yt-dlp.exe");
if (config.localMode) {
userYtDlp = path.join(__dirname, "../../ressources/yt-dlp.exe");
ffmpegPath = path.join(__dirname, "../../ressources/ffmpeg.exe");
ffmpegPath = path.join(__dirname, "../../ressources"); // <- contient ffmpeg.exe et ffprobe.exe
denoPath = path.join(__dirname, "../../ressources/deno.exe");
} else {
userYtDlp = path.join(app.getPath("userData"), "yt-dlp.exe");
ffmpegPath = path.join(process.resourcesPath, "ffmpeg.exe");
ffmpegPath = path.join(process.resourcesPath, "ressources"); // <- ici aussi
denoPath = path.join(process.resourcesPath, "deno.exe");
if (!fs.existsSync(userYtDlp)) {
fs.copyFileSync(sourceYtDlp, userYtDlp);
}
}
module.exports = { userYtDlp, sourceYtDlp, ffmpegPath };
module.exports = { userYtDlp, ffmpegPath, denoPath };