Merge pull request #12 from MasterAcnolo/build-branch

1.2.1
This commit is contained in:
MasterAcnolo
2025-09-17 12:29:53 +02:00
committed by GitHub
10 changed files with 809 additions and 407 deletions

8
.gitignore vendored
View File

@@ -1,6 +1,10 @@
/node_modules
/downloads
/dist
/out
/ressources/ffmpeg.exe
/ressources/ffprobe.exe
logs/*.json
logs/*.log
/out
logs/*.log

View File

@@ -1,5 +1,7 @@
# Freedom Loader
> A besoin de FFMPEG pour fonctionner, si vous avez besoin d'aide pour l'installer. Suivez [Ce lien](https://lecrabeinfo.net/tutoriels/installer-ffmpeg-sur-windows/).
<!-- Release -->
![Static Badge](https://img.shields.io/badge/Release-1.2-blue?style=flat&logo=Test)

View File

@@ -2,6 +2,8 @@
<!-- Release -->
> Require FFMPEG, Follow the tutorial [here](https://lecrabeinfo.net/tutoriels/installer-ffmpeg-sur-windows/) if you need some help.
![Static Badge](https://img.shields.io/badge/Release-1.2-blue?style=flat&logo=Test)
<!-- Build (Next Release) -->

1169
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
{
"name": "freedom-loader",
"productName": "Freedom Loader",
"version": "1.2.0",
"version": "1.2.1",
"author": "MasterAcnolo",
"description": "Freedom Loader",
"main": "main.js",

View File

@@ -1,6 +1,22 @@
// discordRPC.js
const RPC = require("discord-rpc");
/*
This file is part of Freedom Loader.
Copyright (C) 2025 MasterAcnolo
Freedom Loader is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License.
Freedom Loader is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
const RPC = require("discord-rpc");
const clientId = "1410934537051181146";
const rpc = new RPC.Client({ transport: "ipc" });

View File

@@ -23,7 +23,7 @@ const logger = require("../logger").logger;
// Path vers le fichier exécutable yt-dlp (outil tiers pour le téléchargement)
// const ytDlpPath = path.join(__dirname, '../../yt-dlp.exe');
const ytDlpPath = path.join(__dirname, '../../yt-dlp 2025.08.27.exe');
const ytDlpPath = path.join(__dirname, '../../ressources/yt-dlp 2025.08.27.exe');
router.post("/", (req, res) => {
try {
@@ -84,7 +84,8 @@ router.post("/", (req, res) => {
"--add-metadata", // ajoute les tags (titre, artiste, etc.)
"--concurrent-fragments", "8",// accélère le téléchargement
"--retries", "10", // réessaie jusqu'à 10 fois en cas d'erreur
"--fragment-retries", "10" // réessaie aussi 10 fois chaque fragment
"--fragment-retries", "10" , // réessaie aussi 10 fois chaque fragment
"--ffmpeg-location", path.join(__dirname, "../../ressources/ffmpeg.exe")
];
// Si l'option audioOnly est activée, on ajoute les flags pour extraction audio en mp3

View File

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

View File

@@ -31,19 +31,19 @@ const app = express(); // Création de linstance Express, notre serveur web
// Définition du dossier par défaut où enregistrer les téléchargements
// On prend le dossier Téléchargements de lutilisateur Windows (USERPROFILE)
const downloadsPath = path.join(process.env.USERPROFILE, "Downloads");
const outputFolder = path.join(downloadsPath, "Freedom Loader Output");
const outputFolder = path.join(downloadsPath, "Freedom Loader");
// Création du dossier de sortie sil nexiste pas déjà
if (!fs.existsSync(outputFolder)) {
try {
fs.mkdirSync(outputFolder, { recursive: true }); // création récursive au cas où
logger.info("Dossier Freedom Loader Output cree dans Telechargements.");
logger.info("Dossier Freedom Loader cree dans Telechargements.");
} catch (err) {
logger.error("Impossible de creer le dossier :", err);
process.exit(1); // Arrêt du programme si dossier non créé (critique)
}
} else {
logger.info("Dossier Freedom Loader Output deja existant.");
logger.info("Dossier Freedom Loader deja existant.");
}
// On rend ce dossier accessible globalement via app.locals pour lutiliser dans les routes