diff --git a/.gitignore b/.gitignore index d602921..47a88c4 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ /downloads /dist logs/*.json +logs/*.log /out \ No newline at end of file diff --git a/README-EN.md b/README-EN.md index 010cddd..12c34a1 100644 --- a/README-EN.md +++ b/README-EN.md @@ -2,11 +2,11 @@ -![Static Badge](https://img.shields.io/badge/Release-1.1.0-blue?style=flat&logo=Test) +![Static Badge](https://img.shields.io/badge/Release-1.1.1-blue?style=flat&logo=Test) - + -![Static Badge](https://img.shields.io/badge/Build-1.1.1--beta-yellow?style=flat&logo=Test) +![Static Badge](https://img.shields.io/badge/Build-1.1.2--beta-yellow?style=flat&logo=Test) > This project aims to enable free, open-source, and unrestricted downloading of Video/Audio content. Eventually, it will allow users to choose @@ -20,6 +20,7 @@ - ✅ Custom output path selection with saving - ✅ Multiple graphical themes available for interface customization - ✅ Simple, intuitive, and responsive interface +- ✅ Notification system when download finished (Click = Open Output Folder) --- diff --git a/README.md b/README.md index c281199..9942f77 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ -![Static Badge](https://img.shields.io/badge/Release-1.1.0-blue?style=flat&logo=Test) +![Static Badge](https://img.shields.io/badge/Release-1.1.1-blue?style=flat&logo=Test) - + -![Static Badge](https://img.shields.io/badge/Build-1.1.1--beta-yellow?style=flat&logo=Test) +![Static Badge](https://img.shields.io/badge/Build-1.1.2--beta-yellow?style=flat&logo=Test) > 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 @@ -20,6 +20,7 @@ - ✅ Choix du chemin de sortie personnalisé avec sauvegarde - ✅ Plusieurs thèmes graphiques au choix pour personnaliser l’interface - ✅ Interface simple, intuitive +- ✅ Notification quand le téléchargement est fini (Click = Ouverture Dossier Output) --- diff --git a/build/confirm-icon.png b/build/confirm-icon.png new file mode 100644 index 0000000..f01fac2 Binary files /dev/null and b/build/confirm-icon.png differ diff --git a/package-lock.json b/package-lock.json index 23e9233..67fca36 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "freedom-loader", - "version": "1.0.2", + "version": "1.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "freedom-loader", - "version": "1.0.2", + "version": "1.1.1", "dependencies": { "chalk": "^4.1.2", "debug": "^4.4.1", @@ -2792,9 +2792,9 @@ } }, "node_modules/electron": { - "version": "37.1.0", - "resolved": "https://registry.npmjs.org/electron/-/electron-37.1.0.tgz", - "integrity": "sha512-Fcr3yfAw4oU392waVZSlrFUQx4P+h/k31+PRgkBY9tFx9E/zxzdPQQj0achZlG1HRDusw3ooQB+OXb9PvufdzA==", + "version": "37.2.0", + "resolved": "https://registry.npmjs.org/electron/-/electron-37.2.0.tgz", + "integrity": "sha512-dE6+qeg6SBUVd5d8CD2+GH82kh+gF1v40+hs+U+UOno681NMSGmBtgqwldQRpbvtnQDD7V2M9Cpfr3+Abw7aBg==", "dev": true, "hasInstallScript": true, "license": "MIT", diff --git a/package.json b/package.json index 5c3326f..714e825 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "freedom-loader", "productName": "Freedom Loader", - "version": "1.1.0", + "version": "1.1.1", "author": "MasterAcnolo", "description": "Freedom Loader, parce que nous le valons bien", "main": "main.js", @@ -43,6 +43,12 @@ "buildResources": "build" }, "asar": false, + "extraResources": [ + { + "from": "build/confirm-icon.png", + "to": "confirm-icon.png" + } + ], "win": { "target": "nsis", "icon": "build/installer-icon.ico" diff --git a/server/routes/download.js b/server/routes/download.js index 30ad166..9e81666 100644 --- a/server/routes/download.js +++ b/server/routes/download.js @@ -18,11 +18,12 @@ const router = express.Router(); const { execFile } = require("child_process"); const path = require("path"); const fs = require("fs"); - +const { Notification } = require("electron"); 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.exe'); +const ytDlpPath = path.join(__dirname, '../../yt-dlp 2025.06.30.exe'); router.post("/", (req, res) => { try { @@ -144,6 +145,25 @@ router.post("/", (req, res) => { child.on("close", (code) => { logger.info(`yt-dlp terminé avec code de sortie : ${code}`); if (code === 0) { + + const iconPath = path.join(process.resourcesPath, "confirm-icon.png"); // la sécurité pour toutes les machines + + console.log("Icon path pour la notif :", iconPath); + + const notif = new Notification({ + title: "Freedom Loader", + body: "Ton téléchargement est terminé, clique ici pour l'ouvrir.", + icon: iconPath, + }); + + notif.on("click", () => { + console.log("Notification cliquée !"); + //Pour pouvoir ouvrir le dossier de la vidéo + const { shell } = require("electron"); + shell.openPath(requestedOutputFolder); + }); + + notif.show(); res.send("✅ Téléchargement terminé !"); } else { res.status(500).send(`❌ yt-dlp a échoué avec le code : ${code}`); diff --git a/server/routes/info.js b/server/routes/info.js index a1aae33..02e97ba 100644 --- a/server/routes/info.js +++ b/server/routes/info.js @@ -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.exe"); +const ytDlpPath = path.join(__dirname, '../../yt-dlp 2025.06.30.exe'); // Vérification que yt-dlp.exe existe bien au lancement du module if (!fs.existsSync(ytDlpPath)) { diff --git a/yt-dlp.exe b/yt-dlp 2025.06.30.exe similarity index 93% rename from yt-dlp.exe rename to yt-dlp 2025.06.30.exe index e3f3018..309fc8b 100644 Binary files a/yt-dlp.exe and b/yt-dlp 2025.06.30.exe differ