mirror of
https://github.com/MasterAcnolo/Freedom-Loader.git
synced 2026-07-29 18:25:47 +02:00
Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4be5c14999 | ||
|
|
b92ffebdb4 | ||
|
|
7b6e48b09e | ||
|
|
368851b4bb | ||
|
|
fa2da5712d | ||
|
|
7df97d70bb | ||
|
|
5c5f595829 | ||
|
|
5b659e3d8a | ||
|
|
1a526777cc | ||
|
|
b0d99d4c29 | ||
|
|
c7554475a9 | ||
|
|
cab177e8a7 | ||
|
|
f7244a69ac | ||
|
|
c6ed79ed1d | ||
|
|
00e5358bbb | ||
|
|
598c35eb54 | ||
|
|
00c74ea6c6 | ||
|
|
0c415c9106 | ||
|
|
b0495d033d | ||
|
|
d72cc6e0ca | ||
|
|
b59cb9f57f | ||
|
|
af743be5b0 | ||
|
|
024d039701 | ||
|
|
e9a91656bc | ||
|
|
3505606b44 | ||
|
|
815abae0a0 |
8
.gitignore
vendored
8
.gitignore
vendored
@@ -1,6 +1,10 @@
|
|||||||
/node_modules
|
/node_modules
|
||||||
/downloads
|
/downloads
|
||||||
/dist
|
/dist
|
||||||
|
/out
|
||||||
|
|
||||||
|
/ressources/ffmpeg.exe
|
||||||
|
/ressources/ffprobe.exe
|
||||||
|
|
||||||
logs/*.json
|
logs/*.json
|
||||||
logs/*.log
|
logs/*.log
|
||||||
/out
|
|
||||||
@@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
<!-- Release -->
|
<!-- Release -->
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
<!-- Build (Next Release) -->
|
<!-- Build (Next Release) -->
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
> Ce projet a pour but de permettre le téléchargement de contenu Vidéo/Audio de manière gratuite, open source et libre. Il permettra à terme de choisir
|
> Ce projet a pour but de permettre le téléchargement de contenu Vidéo/Audio de manière gratuite, open source et libre.
|
||||||
|
|
||||||
## 🚀 Fonctionnalités
|
## 🚀 Fonctionnalités
|
||||||
|
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
<!-- Release -->
|
<!-- Release -->
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
<!-- Build (Next Release) -->
|
<!-- Build (Next Release) -->
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
> This project aims to enable free, open-source, and unrestricted downloading of Video/Audio content. Eventually, it will allow users to choose
|
> This project aims to enable free, open-source, and unrestricted downloading of Video/Audio content.
|
||||||
|
|
||||||
## 🚀 Features
|
## 🚀 Features
|
||||||
|
|
||||||
|
|||||||
4
main.js
4
main.js
@@ -25,7 +25,7 @@ const { logger, logSessionStart, logSessionEnd, logDir } = require("./server/log
|
|||||||
let mainWindow;
|
let mainWindow;
|
||||||
// Utilise le vrai dossier de logs défini dans logger.js
|
// Utilise le vrai dossier de logs défini dans logger.js
|
||||||
const logsFolderPath = logDir;
|
const logsFolderPath = logDir;
|
||||||
|
app.setAppUserModelId("com.masteracnolo.freedomloader"); /* Pour la notif */
|
||||||
/*
|
/*
|
||||||
Fonction principale qui crée la fenêtre principale de l'application.
|
Fonction principale qui crée la fenêtre principale de l'application.
|
||||||
Elle évite la création multiple et configure les dimensions et options de la fenêtre.
|
Elle évite la création multiple et configure les dimensions et options de la fenêtre.
|
||||||
@@ -40,7 +40,7 @@ async function createWindow() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mainWindow = new BrowserWindow({
|
mainWindow = new BrowserWindow({
|
||||||
title: "Freedom Loader",
|
title: "Freedom Loader 1.2.4", // A Changer à chaque Version
|
||||||
width: 750,
|
width: 750,
|
||||||
height: 800,
|
height: 800,
|
||||||
minWidth: 750,
|
minWidth: 750,
|
||||||
|
|||||||
1229
package-lock.json
generated
1229
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
16
package.json
16
package.json
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "freedom-loader",
|
"name": "freedom-loader",
|
||||||
"productName": "Freedom Loader",
|
"productName": "Freedom Loader",
|
||||||
"version": "1.2.0",
|
"version": "1.2.4",
|
||||||
"author": "MasterAcnolo",
|
"author": "MasterAcnolo",
|
||||||
"description": "Freedom Loader",
|
"description": "Freedom Loader",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
@@ -43,11 +43,23 @@
|
|||||||
"directories": {
|
"directories": {
|
||||||
"buildResources": "build"
|
"buildResources": "build"
|
||||||
},
|
},
|
||||||
"asar": false,
|
"asar": true,
|
||||||
"extraResources": [
|
"extraResources": [
|
||||||
{
|
{
|
||||||
"from": "build/confirm-icon.png",
|
"from": "build/confirm-icon.png",
|
||||||
"to": "confirm-icon.png"
|
"to": "confirm-icon.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "ressources/yt-dlp.exe",
|
||||||
|
"to": "yt-dlp.exe"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "ressources/ffmpeg.exe",
|
||||||
|
"to": "ffmpeg.exe"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "ressources/ffprobe.exe",
|
||||||
|
"to": "ffprobe.exe"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"win": {
|
"win": {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
font-src https://fonts.gstatic.com;
|
font-src https://fonts.gstatic.com;
|
||||||
img-src 'self' data: https://i.ytimg.com;
|
img-src 'self' data: https://i.ytimg.com;
|
||||||
">
|
">
|
||||||
<title>Freedom Loader</title>
|
<title></title>
|
||||||
|
|
||||||
<!--CSS-->
|
<!--CSS-->
|
||||||
<link rel="stylesheet" href="styles/styles.css">
|
<link rel="stylesheet" href="styles/styles.css">
|
||||||
|
|||||||
@@ -43,8 +43,9 @@ body.spicy {
|
|||||||
|
|
||||||
/* Optionnel: background piments */
|
/* Optionnel: background piments */
|
||||||
body.spicy {
|
body.spicy {
|
||||||
background-image: url('../../assets/images/Spicy.webp');
|
background-image: url('../../assets/images/spicy.webp');
|
||||||
background-size:contain;
|
background-size:contain;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
background-attachment: fixed;
|
background-attachment: fixed;
|
||||||
}
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
Binary file not shown.
@@ -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 clientId = "1410934537051181146";
|
||||||
const rpc = new RPC.Client({ transport: "ipc" });
|
const rpc = new RPC.Client({ transport: "ipc" });
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,16 @@ const { Notification } = require("electron");
|
|||||||
const logger = require("../logger").logger;
|
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(__dirname, '../../yt-dlp.exe');
|
// const ytDlpPath = path.join(process.resourcesPath, '../../yt-dlp.exe');
|
||||||
const ytDlpPath = path.join(__dirname, '../../yt-dlp 2025.08.27.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 {
|
||||||
@@ -84,7 +92,8 @@ router.post("/", (req, res) => {
|
|||||||
"--add-metadata", // ajoute les tags (titre, artiste, etc.)
|
"--add-metadata", // ajoute les tags (titre, artiste, etc.)
|
||||||
"--concurrent-fragments", "8",// accélère le téléchargement
|
"--concurrent-fragments", "8",// accélère le téléchargement
|
||||||
"--retries", "10", // réessaie jusqu'à 10 fois en cas d'erreur
|
"--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(process.resourcesPath, "ffmpeg.exe")
|
||||||
];
|
];
|
||||||
|
|
||||||
// Si l'option audioOnly est activée, on ajoute les flags pour extraction audio en mp3
|
// Si l'option audioOnly est activée, on ajoute les flags pour extraction audio en mp3
|
||||||
|
|||||||
@@ -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, '../../yt-dlp 2025.08.27.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)) {
|
||||||
|
|||||||
@@ -31,19 +31,19 @@ const app = express(); // Création de l’instance Express, notre serveur web
|
|||||||
// Définition du dossier par défaut où enregistrer les téléchargements
|
// Définition du dossier par défaut où enregistrer les téléchargements
|
||||||
// On prend le dossier Téléchargements de l’utilisateur Windows (USERPROFILE)
|
// On prend le dossier Téléchargements de l’utilisateur Windows (USERPROFILE)
|
||||||
const downloadsPath = path.join(process.env.USERPROFILE, "Downloads");
|
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 s’il n’existe pas déjà
|
// Création du dossier de sortie s’il n’existe pas déjà
|
||||||
if (!fs.existsSync(outputFolder)) {
|
if (!fs.existsSync(outputFolder)) {
|
||||||
try {
|
try {
|
||||||
fs.mkdirSync(outputFolder, { recursive: true }); // création récursive au cas où
|
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) {
|
} catch (err) {
|
||||||
logger.error("Impossible de creer le dossier :", err);
|
logger.error("Impossible de creer le dossier :", err);
|
||||||
process.exit(1); // Arrêt du programme si dossier non créé (critique)
|
process.exit(1); // Arrêt du programme si dossier non créé (critique)
|
||||||
}
|
}
|
||||||
} else {
|
} 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 l’utiliser dans les routes
|
// On rend ce dossier accessible globalement via app.locals pour l’utiliser dans les routes
|
||||||
|
|||||||
Reference in New Issue
Block a user