Compare commits
38 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cab177e8a7 | ||
|
|
f7244a69ac | ||
|
|
c6ed79ed1d | ||
|
|
00e5358bbb | ||
|
|
598c35eb54 | ||
|
|
00c74ea6c6 | ||
|
|
0c415c9106 | ||
|
|
b0495d033d | ||
|
|
d72cc6e0ca | ||
|
|
b59cb9f57f | ||
|
|
af743be5b0 | ||
|
|
024d039701 | ||
|
|
e9a91656bc | ||
|
|
3505606b44 | ||
|
|
815abae0a0 | ||
|
|
004271241e | ||
|
|
8295967ff2 | ||
|
|
053dca365c | ||
|
|
62110b1a5b | ||
|
|
aae9b2866c | ||
|
|
0d8bddbc20 | ||
|
|
2a7d61bab7 | ||
|
|
de71035fa0 | ||
|
|
5368fb9311 | ||
|
|
3d583a9b6f | ||
|
|
94de0a42f1 | ||
|
|
5ba2901273 | ||
|
|
f5888b8382 | ||
|
|
6ece182629 | ||
|
|
777257b71d | ||
|
|
df0156d603 | ||
|
|
68cdad06ab | ||
|
|
ee7c6520b9 | ||
|
|
4ed1609e41 | ||
|
|
b64e61d45d | ||
|
|
b4c2c865d8 | ||
|
|
e32ffd8fa0 | ||
|
|
8be6a932e5 |
6
.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
|
|
||||||
113
README-EN.md
@@ -1,113 +0,0 @@
|
|||||||
# Freedom Loader
|
|
||||||
|
|
||||||
<!-- 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
|
|
||||||
|
|
||||||
## 🚀 Features
|
|
||||||
|
|
||||||
- ✅ Video download (MP4)
|
|
||||||
- ✅ Audio-only download (MP3)
|
|
||||||
- ✅ Full playlist support
|
|
||||||
- ✅ Automatic metadata retrieval (title, duration, etc.)
|
|
||||||
- ✅ Detailed logs: console and rotating files (7 days)
|
|
||||||
- ✅ 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)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🔧 Installation
|
|
||||||
|
|
||||||
To install the application, simply download the installer from the releases section. Take the latest version and run it.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## ❓ Frequently Asked Questions
|
|
||||||
|
|
||||||
### _Where are my downloaded files located?_
|
|
||||||
|
|
||||||
In your computer's Downloads folder (**C:\Users\YOUR NAME\Downloads**), inside a folder named **Freedom Loader Output**
|
|
||||||
<br>
|
|
||||||
|
|
||||||
### _After installing and running the program, I get an error_
|
|
||||||
|
|
||||||
Try restarting the application, checking the logs, or opening the browser's developer console by pressing `CTRL + SHIFT + I` or by going to `View > Toggle Developer Tools`
|
|
||||||
|
|
||||||
<!--  -->
|
|
||||||
<p align="center">
|
|
||||||
<img src="build/example-developertools.png" alt="Example Developer Tools" />
|
|
||||||
</p>
|
|
||||||
|
|
||||||
## 🏗️ Upcoming Features (Roadmap)
|
|
||||||
|
|
||||||
- [ ] More format options
|
|
||||||
- [ ] Subtitle support
|
|
||||||
- [ ] Improved UI / UX
|
|
||||||
- [ ] Language selection
|
|
||||||
- [ ] Download a specific part of the video
|
|
||||||
- [ ] Rename output file
|
|
||||||
- [ ] Extract / Split video using native chapters
|
|
||||||
- [ ] Parallel downloads
|
|
||||||
- [ ] Skip sponsored parts of videos
|
|
||||||
- [x] ~~Custom output path selection (default **C:\Users\Username\Downloads** with a **Freedom Loader Output** folder created)~~
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🖼️ Preview
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<img src="build/apercu1.0.1.png" alt="Exemple d'application" />
|
|
||||||
</p>
|
|
||||||
|
|
||||||
> Here is an example of the app after launch and entering a URL
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## ℹ️ About
|
|
||||||
|
|
||||||
This project was built using [](https://github.com/yt-dlp/yt-dlp)
|
|
||||||
Thanks to them for providing a free and open-source API.
|
|
||||||
|
|
||||||
This project is open-source and welcomes your contributions.
|
|
||||||
Here is how to get involved:
|
|
||||||
|
|
||||||
- **🪲 Bug Reporting**
|
|
||||||
Please use the [GitHub issues system](https://github.com/MasterAcnolo/Freedom-Loader/issues) to report any bugs you encounter.
|
|
||||||
Try to provide clear reproduction steps and logs if possible. Logs are located in the installation folder of the program. Example path:
|
|
||||||
`C:\Users\[YOUR NAME]\Desktop\Freedom Loader\resources\app\logs`
|
|
||||||
The log file will be named something like `combined-20xx-xx-xx.log`
|
|
||||||
<br>
|
|
||||||
- **🛠️ Contribution**
|
|
||||||
Pull Requests are welcome! Please fork the repo and submit your PR after ensuring you meet the contribution guidelines (tests, style, etc.).
|
|
||||||
<br>
|
|
||||||
- **💡 Feature Suggestions**
|
|
||||||
You can propose new ideas via a [feature request issue](https://github.com/MasterAcnolo/Freedom-Loader/issues).
|
|
||||||
Any clear and detailed proposal will be reviewed.
|
|
||||||
<br>
|
|
||||||
- **💰 Support the Project**
|
|
||||||
<p>
|
|
||||||
If you'd like to support me, you can donate via
|
|
||||||
<a href="https://paypal.me/axelnicolas25">
|
|
||||||
<img src="https://img.shields.io/badge/PayPal-00457C?style=for-the-badge&logo=paypal&logoColor=white" alt="PayPal">
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📄 License
|
|
||||||
|
|
||||||
This project is licensed under the **MIT License** — see the [LICENSE](./LICENSE) file for details.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## ⚠️ Disclaimer
|
|
||||||
|
|
||||||
I have obviously used AI assistance for some parts of this project. Use AI sparingly and always be aware of what you are doing.
|
|
||||||
114
README-FR.md
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
# Freedom Loader
|
||||||
|
|
||||||
|
<!-- 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
|
||||||
|
|
||||||
|
## 🚀 Fonctionnalités
|
||||||
|
|
||||||
|
- ✅ Téléchargement de vidéos avec les métadonnées (MP4)
|
||||||
|
- ✅ Téléchargement audio uniquement, avec la couverture ainsi que les métadonnées (MP3)
|
||||||
|
- ✅ Support des playlists complètes
|
||||||
|
- ✅ Récupération automatique des métadonnées (titre, durée, etc.)
|
||||||
|
- ✅ Logs détaillés : console et fichiers rotatifs (7 jours)
|
||||||
|
- ✅ 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)
|
||||||
|
- ✅ Discord Rich Presence
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🔧 Installation
|
||||||
|
|
||||||
|
Pour installer l'application, il vous suffit de télécharger l'installateur dans la section releases, de prendre la dernière version et de l'exécuter.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## ❓ Questions fréquentes
|
||||||
|
|
||||||
|
### _Où se situent mes fichiers une fois téléchargés ?_
|
||||||
|
|
||||||
|
Dans le dossier Téléchargements (**C:\Users\VOTRE NOM\Downloads**) de votre ordinateur, dans un dossier nommé **Freedom Loader Output**
|
||||||
|
<br>
|
||||||
|
|
||||||
|
### _Une fois le programme installé et lancé, j'ai une erreur_
|
||||||
|
|
||||||
|
Essayez de relancer l'application, de consulter les logs ou d'ouvrir la console de développement du navigateur en faisant le raccourci `CTRL + SHIFT + I` ou via `View > Toggle Developer Tools`.
|
||||||
|
|
||||||
|
<!--  -->
|
||||||
|
<p align="center">
|
||||||
|
<img src="build/example-developertools.png" alt="Exemple Developer Tools" />
|
||||||
|
</p>
|
||||||
|
|
||||||
|
## 🏗️ Fonctionnalités à venir (Roadmap)
|
||||||
|
|
||||||
|
- [ ] Plus de choix de formats
|
||||||
|
- [ ] Support des sous-titres
|
||||||
|
- [ ] Meilleure UI / UX
|
||||||
|
- [ ] Choix des langues
|
||||||
|
- [ ] Téléchargement d’une partie de la vidéo
|
||||||
|
- [ ] Renommage du fichier de sortie
|
||||||
|
- [x] ~~Extraction / découpage de la vidéo via chapitrage natif~~
|
||||||
|
- [ ] Téléchargements parallèles
|
||||||
|
- [ ] Suppression automatique des parties sponsorisées (skip sponsor)
|
||||||
|
- [x] ~~Choix personnalisé du chemin de sortie (par défaut **C:\Users\Utilisateur\Downloads**, où un dossier **Freedom Loader Output** sera créé)~~
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🖼️ Aperçu
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<img src="build/apercu1.0.1.png" alt="Exemple d'application" />
|
||||||
|
</p>
|
||||||
|
|
||||||
|
> Voici un exemple de l’application lancée après avoir saisi une URL.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## ℹ️ À propos
|
||||||
|
|
||||||
|
Ce projet a été réalisé en utilisant [](https://github.com/yt-dlp/yt-dlp)
|
||||||
|
Merci à eux de nous permettre d’utiliser leur API gratuitement et en open source.
|
||||||
|
|
||||||
|
Ce projet est open source et accueille volontiers vos contributions.
|
||||||
|
Voici comment participer :
|
||||||
|
|
||||||
|
- **🪲 Signalement de bugs**
|
||||||
|
Merci d’utiliser le [système d’issues GitHub](https://github.com/MasterAcnolo/Freedom-Loader/issues) pour remonter les bugs rencontrés.
|
||||||
|
Essayez de fournir une reproduction claire et les logs si possible. Les logs se trouvent dans le dossier d’installation du programme. Exemple de chemin :
|
||||||
|
`C:\Users\[VOTRE NOM]\Desktop\Freedom Loader\resources\app\logs`
|
||||||
|
Le fichier aura un nom du type `combined-20xx-xx-xx.log`.
|
||||||
|
<br>
|
||||||
|
- **🛠️ Contribution**
|
||||||
|
Les Pull Requests sont les bienvenues ! Merci de forker le repo et de soumettre votre PR après avoir vérifié le respect des guidelines (tests, style, etc.).
|
||||||
|
<br>
|
||||||
|
- **💡 Suggestions de fonctionnalités**
|
||||||
|
Vous pouvez proposer de nouvelles idées via une [issue de type feature request](https://github.com/MasterAcnolo/Freedom-Loader/issues).
|
||||||
|
Toute proposition claire et détaillée sera étudiée.
|
||||||
|
<br>
|
||||||
|
- **💰 Soutenir le projet**
|
||||||
|
<p>
|
||||||
|
Si vous souhaitez m’encourager, vous pouvez faire un don sur
|
||||||
|
<a href="https://paypal.me/axelnicolas25">
|
||||||
|
<img src="https://img.shields.io/badge/PayPal-00457C?style=for-the-badge&logo=paypal&logoColor=white" alt="PayPal">
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📄 Licence
|
||||||
|
|
||||||
|
Ce projet est sous licence **MIT** — voir le fichier [LICENSE](./LICENSE) pour plus d’informations.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## ⚠️ Disclaimer
|
||||||
|
|
||||||
|
J’ai bien évidemment eu recours à l’IA pour m’aider sur certaines parties du projet. Utilisez l’IA avec parcimonie et soyez toujours conscient de ce que vous faites.
|
||||||
113
README.md
@@ -2,99 +2,100 @@
|
|||||||
|
|
||||||
<!-- 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
|
> This project aims to enable free, open-source, and unrestricted downloading of Video/Audio content. Eventually, it will allow users to choose
|
||||||
|
|
||||||
## 🚀 Fonctionnalités
|
## 🚀 Features
|
||||||
|
|
||||||
- ✅ Téléchargement de vidéos (MP4)
|
- ✅ Video download with metadata(MP4)
|
||||||
- ✅ Téléchargement audio uniquement (MP3)
|
- ✅ Audio-only download with thumbail and metadata(MP3)
|
||||||
- ✅ Support des playlists complètes
|
- ✅ Full playlist support
|
||||||
- ✅ Récupération automatique des métadonnées (titre, durée, etc.)
|
- ✅ Automatic metadata retrieval (title, duration, etc.)
|
||||||
- ✅ Logs détaillés : console et fichiers rotatifs (7 jours)
|
- ✅ Detailed logs: console and rotating files (7 days)
|
||||||
- ✅ Choix du chemin de sortie personnalisé avec sauvegarde
|
- ✅ Custom output path selection with saving
|
||||||
- ✅ Plusieurs thèmes graphiques au choix pour personnaliser l’interface
|
- ✅ Multiple graphical themes available for interface customization
|
||||||
- ✅ Interface simple, intuitive
|
- ✅ Simple, intuitive, and responsive interface
|
||||||
- ✅ Notification quand le téléchargement est fini (Click = Ouverture Dossier Output)
|
- ✅ Notification system when download finished (Click = Open Output Folder)
|
||||||
|
- ✅ Discord Rich Presence
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🔧 Installation
|
## 🔧 Installation
|
||||||
|
|
||||||
Pour installer l'application, il vous suffit de télécharger l'installateur dans la section releases, de prendre la dernière version et de l'exécuter.
|
To install the application, simply download the installer from the releases section. Take the latest version and run it.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## ❓ Questions fréquentes
|
## ❓ Frequently Asked Questions
|
||||||
|
|
||||||
### _Où se situent mes fichiers une fois téléchargés ?_
|
### _Where are my downloaded files located?_
|
||||||
|
|
||||||
Dans le dossier Téléchargements (**C:\Users\VOTRE NOM\Downloads**) de votre ordinateur, dans un dossier nommé **Freedom Loader Output**
|
In your computer's Downloads folder (**C:\Users\YOUR NAME\Downloads**), inside a folder named **Freedom Loader Output**
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
### _Une fois le programme installé et lancé, j'ai une erreur_
|
### _After installing and running the program, I get an error_
|
||||||
|
|
||||||
Essayez de relancer l'application, de consulter les logs ou d'ouvrir la console de développement du navigateur en faisant le raccourci `CTRL + SHIFT + I` ou via `View > Toggle Developer Tools`.
|
Try restarting the application, checking the logs, or opening the browser's developer console by pressing `CTRL + SHIFT + I` or by going to `View > Toggle Developer Tools`
|
||||||
|
|
||||||
<!--  -->
|
<!--  -->
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="build/example-developertools.png" alt="Exemple Developer Tools" />
|
<img src="build/example-developertools.png" alt="Example Developer Tools" />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
## 🏗️ Fonctionnalités à venir (Roadmap)
|
## 🏗️ Upcoming Features (Roadmap)
|
||||||
|
|
||||||
- [ ] Plus de choix de formats
|
- [ ] More format options
|
||||||
- [ ] Support des sous-titres
|
- [ ] Subtitle support
|
||||||
- [ ] Meilleure UI / UX
|
- [ ] Improved UI / UX
|
||||||
- [ ] Choix des langues
|
- [ ] Language selection
|
||||||
- [ ] Téléchargement d’une partie de la vidéo
|
- [ ] Download a specific part of the video
|
||||||
- [ ] Renommage du fichier de sortie
|
- [ ] Rename output file
|
||||||
- [ ] Extraction / découpage de la vidéo via chapitrage natif
|
- [x] ~~Extract / Split video using native chapters~~
|
||||||
- [ ] Téléchargements parallèles
|
- [ ] Parallel downloads
|
||||||
- [ ] Suppression automatique des parties sponsorisées (skip sponsor)
|
- [ ] Skip sponsored parts of videos
|
||||||
- [x] ~~Choix personnalisé du chemin de sortie (par défaut **C:\Users\Utilisateur\Downloads**, où un dossier **Freedom Loader Output** sera créé)~~
|
- [x] ~~Custom output path selection (default **C:\Users\Username\Downloads** with a **Freedom Loader Output** folder created)~~
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🖼️ Aperçu
|
## 🖼️ Preview
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="build/apercu1.0.1.png" alt="Exemple d'application" />
|
<img src="build/apercu1.0.1.png" alt="Exemple d'application" />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
> Voici un exemple de l’application lancée après avoir saisi une URL.
|
> Here is an example of the app after launch and entering a URL
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## ℹ️ À propos
|
## ℹ️ About
|
||||||
|
|
||||||
Ce projet a été réalisé en utilisant [](https://github.com/yt-dlp/yt-dlp)
|
This project was built using [](https://github.com/yt-dlp/yt-dlp)
|
||||||
Merci à eux de nous permettre d’utiliser leur API gratuitement et en open source.
|
Thanks to them for providing a free and open-source API.
|
||||||
|
|
||||||
Ce projet est open source et accueille volontiers vos contributions.
|
This project is open-source and welcomes your contributions.
|
||||||
Voici comment participer :
|
Here is how to get involved:
|
||||||
|
|
||||||
- **🪲 Signalement de bugs**
|
- **🪲 Bug Reporting**
|
||||||
Merci d’utiliser le [système d’issues GitHub](https://github.com/MasterAcnolo/Freedom-Loader/issues) pour remonter les bugs rencontrés.
|
Please use the [GitHub issues system](https://github.com/MasterAcnolo/Freedom-Loader/issues) to report any bugs you encounter.
|
||||||
Essayez de fournir une reproduction claire et les logs si possible. Les logs se trouvent dans le dossier d’installation du programme. Exemple de chemin :
|
Try to provide clear reproduction steps and logs if possible. Logs are located in the installation folder of the program. Example path:
|
||||||
`C:\Users\[VOTRE NOM]\Desktop\Freedom Loader\resources\app\logs`
|
`C:\Users\[YOUR NAME]\Desktop\Freedom Loader\resources\app\logs`
|
||||||
Le fichier aura un nom du type `combined-20xx-xx-xx.log`.
|
The log file will be named something like `combined-20xx-xx-xx.log`
|
||||||
<br>
|
<br>
|
||||||
- **🛠️ Contribution**
|
- **🛠️ Contribution**
|
||||||
Les Pull Requests sont les bienvenues ! Merci de forker le repo et de soumettre votre PR après avoir vérifié le respect des guidelines (tests, style, etc.).
|
Pull Requests are welcome! Please fork the repo and submit your PR after ensuring you meet the contribution guidelines (tests, style, etc.).
|
||||||
<br>
|
<br>
|
||||||
- **💡 Suggestions de fonctionnalités**
|
- **💡 Feature Suggestions**
|
||||||
Vous pouvez proposer de nouvelles idées via une [issue de type feature request](https://github.com/MasterAcnolo/Freedom-Loader/issues).
|
You can propose new ideas via a [feature request issue](https://github.com/MasterAcnolo/Freedom-Loader/issues).
|
||||||
Toute proposition claire et détaillée sera étudiée.
|
Any clear and detailed proposal will be reviewed.
|
||||||
<br>
|
<br>
|
||||||
- **💰 Soutenir le projet**
|
- **💰 Support the Project**
|
||||||
<p>
|
<p>
|
||||||
Si vous souhaitez m’encourager, vous pouvez faire un don sur
|
If you'd like to support me, you can donate via
|
||||||
<a href="https://paypal.me/axelnicolas25">
|
<a href="https://paypal.me/axelnicolas25">
|
||||||
<img src="https://img.shields.io/badge/PayPal-00457C?style=for-the-badge&logo=paypal&logoColor=white" alt="PayPal">
|
<img src="https://img.shields.io/badge/PayPal-00457C?style=for-the-badge&logo=paypal&logoColor=white" alt="PayPal">
|
||||||
</a>
|
</a>
|
||||||
@@ -102,12 +103,12 @@ Voici comment participer :
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 📄 Licence
|
## 📄 License
|
||||||
|
|
||||||
Ce projet est sous licence **MIT** — voir le fichier [LICENSE](./LICENSE) pour plus d’informations.
|
This project is licensed under the **MIT License** — see the [LICENSE](./LICENSE) file for details.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## ⚠️ Disclaimer
|
## ⚠️ Disclaimer
|
||||||
|
|
||||||
J’ai bien évidemment eu recours à l’IA pour m’aider sur certaines parties du projet. Utilisez l’IA avec parcimonie et soyez toujours conscient de ce que vous faites.
|
I have obviously used AI assistance for some parts of this project. Use AI sparingly and always be aware of what you are doing.
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 264 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 264 KiB After Width: | Height: | Size: 146 KiB |
37
main.js
@@ -16,13 +16,16 @@
|
|||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const { app, BrowserWindow, ipcMain, dialog } = require("electron");
|
const { app, BrowserWindow, ipcMain, dialog, Menu, shell } = require("electron");
|
||||||
|
app.disableHardwareAcceleration(); // Désactive l'accélération GPU pour éviter les erreurs GPU sur certains systèmes
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const os = require("os");
|
const os = require("os");
|
||||||
const { logger, logSessionStart, logSessionEnd } = require("./server/logger");
|
const { logger, logSessionStart, logSessionEnd, logDir } = require("./server/logger");
|
||||||
|
|
||||||
let mainWindow;
|
let mainWindow;
|
||||||
|
// Utilise le vrai dossier de logs défini dans logger.js
|
||||||
|
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.
|
||||||
@@ -37,7 +40,7 @@ async function createWindow() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mainWindow = new BrowserWindow({
|
mainWindow = new BrowserWindow({
|
||||||
title: "Freedom Loader",
|
title: "Freedom Loader 1.2.2", // A Changer à chaque Version
|
||||||
width: 750,
|
width: 750,
|
||||||
height: 800,
|
height: 800,
|
||||||
minWidth: 750,
|
minWidth: 750,
|
||||||
@@ -113,6 +116,32 @@ app.whenReady().then(async () => {
|
|||||||
await expressServer.startServer();
|
await expressServer.startServer();
|
||||||
logger.info("Serveur Express démarré");
|
logger.info("Serveur Express démarré");
|
||||||
await createWindow();
|
await createWindow();
|
||||||
|
|
||||||
|
// Ajout du menu personnalisé
|
||||||
|
const menuTemplate = [
|
||||||
|
// ... Menu standard Electron ...
|
||||||
|
{
|
||||||
|
label: "Logs",
|
||||||
|
submenu: [
|
||||||
|
{
|
||||||
|
label: "Ouvrir les logs",
|
||||||
|
click: () => {
|
||||||
|
shell.openPath(logsFolderPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// Fusionner avec le menu par défaut
|
||||||
|
const defaultMenu = Menu.getApplicationMenu();
|
||||||
|
let template = menuTemplate;
|
||||||
|
if (defaultMenu) {
|
||||||
|
template = [...Menu.getApplicationMenu().items.map(item => item), ...menuTemplate];
|
||||||
|
}
|
||||||
|
const finalMenu = Menu.buildFromTemplate(template);
|
||||||
|
Menu.setApplicationMenu(finalMenu);
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error("Erreur serveur ou fenêtre :", error);
|
logger.error("Erreur serveur ou fenêtre :", error);
|
||||||
app.quit();
|
app.quit();
|
||||||
|
|||||||
1412
package-lock.json
generated
17
package.json
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "freedom-loader",
|
"name": "freedom-loader",
|
||||||
"productName": "Freedom Loader",
|
"productName": "Freedom Loader",
|
||||||
"version": "1.1.1",
|
"version": "1.2.2",
|
||||||
"author": "MasterAcnolo",
|
"author": "MasterAcnolo",
|
||||||
"description": "Freedom Loader, parce que nous le valons bien",
|
"description": "Freedom Loader",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "electron-forge start",
|
"start": "electron-forge start",
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chalk": "^4.1.2",
|
"chalk": "^4.1.2",
|
||||||
"debug": "^4.4.1",
|
"debug": "^4.4.1",
|
||||||
|
"discord-rpc": "^4.0.1",
|
||||||
"electron-squirrel-startup": "^1.0.1",
|
"electron-squirrel-startup": "^1.0.1",
|
||||||
"express": "^5.1.0",
|
"express": "^5.1.0",
|
||||||
"winston": "^3.17.0",
|
"winston": "^3.17.0",
|
||||||
@@ -42,11 +43,19 @@
|
|||||||
"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 2025.08.27.exe",
|
||||||
|
"to": "yt-dlp 2025.08.27.exe"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "ressources/ffmpeg.exe",
|
||||||
|
"to": "ffmpeg.exe"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"win": {
|
"win": {
|
||||||
|
|||||||
BIN
public/assets/images/Chirac.png
Normal file
|
After Width: | Height: | Size: 3.2 MiB |
|
Before Width: | Height: | Size: 805 KiB After Width: | Height: | Size: 805 KiB |
BIN
public/assets/images/NF.jpg
Normal file
|
After Width: | Height: | Size: 139 KiB |
|
Before Width: | Height: | Size: 27 KiB |
BIN
public/assets/images/Vilbrequin.webp
Normal file
|
After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 16 KiB |
@@ -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">
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ const themes = {
|
|||||||
default: "Default",
|
default: "Default",
|
||||||
dark: "Sombre",
|
dark: "Sombre",
|
||||||
light: "Clair",
|
light: "Clair",
|
||||||
|
nf : "NF",
|
||||||
chirac: "Chirac",
|
chirac: "Chirac",
|
||||||
fanatic: "Fanatic",
|
fanatic: "Fanatic",
|
||||||
cyberpunk: "Cyberpunk",
|
cyberpunk: "Cyberpunk",
|
||||||
@@ -32,6 +33,7 @@ const themeSubtitles = {
|
|||||||
default: "Because why not?",
|
default: "Because why not?",
|
||||||
dark: "Darkness is my ally",
|
dark: "Darkness is my ally",
|
||||||
light: "Qui aime ce thème ?",
|
light: "Qui aime ce thème ?",
|
||||||
|
nf : "You call it music, i call it my Therapist",
|
||||||
chirac: "J'aime les pommes",
|
chirac: "J'aime les pommes",
|
||||||
fanatic: "Always Fnatic !",
|
fanatic: "Always Fnatic !",
|
||||||
cyberpunk: "Wake up, choom. We’ve got a city to burn.",
|
cyberpunk: "Wake up, choom. We’ve got a city to burn.",
|
||||||
|
|||||||
@@ -29,13 +29,14 @@
|
|||||||
color: var(--form-button-text-color);
|
color: var(--form-button-text-color);
|
||||||
border: none;
|
border: none;
|
||||||
padding: 0.3em 0.8em;
|
padding: 0.3em 0.8em;
|
||||||
border-radius: 6px;
|
border-radius: 8px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background-color 0.3s ease, transform 0.2s ease;
|
transition: background-color 0.3s ease, transform 0.2s ease;
|
||||||
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
|
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
|
||||||
|
font-size: 0.9rem;
|
||||||
|
font-weight: 550;
|
||||||
}
|
}
|
||||||
|
|
||||||
.download-path button#changePath:hover {
|
.download-path button#changePath:hover {
|
||||||
background-color: var(--form-button-bg-hover-color);
|
background-color: var(--form-button-bg-hover-color);
|
||||||
transform: scale(1.05);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
body.chirac {
|
body.chirac {
|
||||||
/* Background image Chirac */
|
/* Background image Chirac */
|
||||||
background-image: url('../../assets/images/goat.webp');
|
background-image: url('../../assets/images/Chirac.png');
|
||||||
background-position: right;
|
/* background-position: right; */
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-attachment: fixed;
|
background-attachment: fixed;
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ body.cyberpunk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
body.cyberpunk {
|
body.cyberpunk {
|
||||||
background-image: url('../../assets/images/cyberpunk4.webp');
|
background-image: url('../../assets/images/Cyberpunk.webp');
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
|||||||
48
public/styles/theme/nf-theme.css
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
body.nf {
|
||||||
|
/* Couleurs générales */
|
||||||
|
--background-color: #1a1a1a; /* fond sombre neutre */
|
||||||
|
--default-text-color: #e6dfd5; /* texte beige clair */
|
||||||
|
--subtitle-color: #f5f0e6; /* beige très clair (titres) */
|
||||||
|
--mp3-text-color: #d8cfc2; /* texte checkbox */
|
||||||
|
|
||||||
|
/* Formulaire */
|
||||||
|
--form-bg-color: #2a2a2a; /* fond formulaire gris sombre */
|
||||||
|
--form-input-bg-color: #222222; /* fond inputs sombre */
|
||||||
|
--form-input-border-color: #4a4036; /* bordure beige/brun */
|
||||||
|
--form-input-border-focus-color: #cbb89d; /* beige doré en focus */
|
||||||
|
--form-input-text-color: #f0e8dd; /* texte clair/beige */
|
||||||
|
--form-input-placeholder-color: #9a8f80; /* placeholder beige/gris */
|
||||||
|
--form-button-bg-color: #cbb89d; /* bouton beige doré */
|
||||||
|
--form-button-text-color: #1a1a1a; /* texte sombre */
|
||||||
|
--form-button-bg-hover-color: #b7a588; /* hover beige plus foncé */
|
||||||
|
|
||||||
|
/* Checkbox */
|
||||||
|
--checkbox-bg-default: #4a4036; /* brun/gris */
|
||||||
|
--checkbox-bg-checked: #cbb89d; /* beige doré */
|
||||||
|
--checkbox-checkmark-border-color: #1a1a1a; /* noir profond */
|
||||||
|
--checkbox-pulse-color: rgba(203,184,157,0.3); /* halo beige doux */
|
||||||
|
|
||||||
|
/* Download status */
|
||||||
|
--download-status-color: #cbb89d; /* beige doré */
|
||||||
|
|
||||||
|
/* Video Info Box */
|
||||||
|
--infos-box-color: #2a2a2a; /* fond sombre */
|
||||||
|
--video-info-text-color: #e6dfd5; /* texte beige clair */
|
||||||
|
--video-info-heading-color: #f5f0e6; /* titres beige clair */
|
||||||
|
--video-info-list-color: #d8cfc2; /* texte liste */
|
||||||
|
--video-info-list-strong-color: #ffffff; /* texte fort blanc cassé */
|
||||||
|
--video-info-link-color: #cbb89d; /* liens beige doré */
|
||||||
|
--video-info-link-hover-color: #b7a588; /* hover beige plus foncé */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fond inspiré de ton image beige */
|
||||||
|
body.nf {
|
||||||
|
background-image: url('../../assets/images/NF.jpg'); /* mets ton image ici */
|
||||||
|
background-size: cover;
|
||||||
|
background-position: 70% center;
|
||||||
|
background-attachment: fixed;
|
||||||
|
}
|
||||||
|
|
||||||
|
body.nf .download-path {
|
||||||
|
color: var(--default-text-color);
|
||||||
|
}
|
||||||
@@ -1,8 +1,14 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
body.spicy {
|
body.spicy {
|
||||||
/* Couleurs générales */
|
/* Couleurs générales */
|
||||||
--background-color: #121212; /* fond noir profond */
|
--background-color: #121212; /* fond noir profond */
|
||||||
--default-text-color: #f5f5f5; /* texte clair */
|
--default-text-color: #581010; /* texte clair */
|
||||||
--subtitle-color: #e29191; /* accent rouge piment */
|
--subtitle-color: #3d0909; /* accent rouge piment */
|
||||||
--mp3-text-color: #ffffff; /* texte checkbox inline */
|
--mp3-text-color: #ffffff; /* texte checkbox inline */
|
||||||
|
|
||||||
/* Formulaire */
|
/* Formulaire */
|
||||||
@@ -37,8 +43,8 @@ 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: cover;
|
background-size:contain;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
background-attachment: fixed;
|
background-attachment: fixed;
|
||||||
}
|
}
|
||||||
|
|||||||
1
public/styles/theme/themeimport.css
vendored
@@ -6,3 +6,4 @@
|
|||||||
@import url("cyberpunk-theme.css");
|
@import url("cyberpunk-theme.css");
|
||||||
@import url("spicy-theme.css");
|
@import url("spicy-theme.css");
|
||||||
@import url("vilbrequin-theme.css");
|
@import url("vilbrequin-theme.css");
|
||||||
|
@import url("nf-theme.css");
|
||||||
@@ -37,7 +37,7 @@ body.vilbrequin {
|
|||||||
|
|
||||||
/* Optionnel: motif turbo ou jantes */
|
/* Optionnel: motif turbo ou jantes */
|
||||||
body.vilbrequin {
|
body.vilbrequin {
|
||||||
background-image: url('../../assets/images/Vilbrequin.avif'); /* adapte ton image */
|
background-image: url('../../assets/images/Vilbrequin.webp'); /* adapte ton image */
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
background-attachment: fixed;
|
background-attachment: fixed;
|
||||||
|
|||||||
48
server/discordRPC.js
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
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" });
|
||||||
|
|
||||||
|
function startRPC() {
|
||||||
|
rpc.on("ready", () => {
|
||||||
|
console.log("✅ Connecté à Discord !");
|
||||||
|
|
||||||
|
const presence = {
|
||||||
|
largeImageKey: "icon",
|
||||||
|
smallImageKey: "acnolo_pfp",
|
||||||
|
smallImageText: "By MasterAcnolo",
|
||||||
|
startTimestamp: new Date(), // compteur de temps
|
||||||
|
details: "github.com/MasterAcnolo/Freedom-Loader",
|
||||||
|
};
|
||||||
|
|
||||||
|
rpc.setActivity(presence);
|
||||||
|
|
||||||
|
// Mise à jour toutes les 15 secondes si tu veux garder le compteur à jour
|
||||||
|
setInterval(() => {
|
||||||
|
rpc.setActivity(presence);
|
||||||
|
}, 15000);
|
||||||
|
});
|
||||||
|
|
||||||
|
rpc.login({ clientId }).catch(err => {
|
||||||
|
console.error("Erreur Discord RPC :", err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = { startRPC };
|
||||||
@@ -20,12 +20,23 @@ const { createLogger, format, transports } = require("winston");
|
|||||||
const DailyRotateFile = require("winston-daily-rotate-file");
|
const DailyRotateFile = require("winston-daily-rotate-file");
|
||||||
const fs = require("fs"); // Pour vérifier/créer le dossier de logs
|
const fs = require("fs"); // Pour vérifier/créer le dossier de logs
|
||||||
const path = require("path"); // Pour gérer proprement les chemins
|
const path = require("path"); // Pour gérer proprement les chemins
|
||||||
|
const os = require("os"); // Pour gérer les chemins aussi
|
||||||
|
|
||||||
// Définition du dossier où seront stockés les logs
|
// Définition du dossier où seront stockés les logs
|
||||||
const logDir = path.join(__dirname, "../logs");
|
// const logDir = path.join(__dirname, "../logs"); Désactivé parce que cela requiert d'exec en admin mode. Donc pas pratique pour les gens
|
||||||
|
|
||||||
|
let logDir;
|
||||||
|
if (process.platform === "win32") {
|
||||||
|
logDir = path.join(os.homedir(), "AppData", "Local", "FreedomLoader", "logs");
|
||||||
|
} else {
|
||||||
|
logDir = path.join(os.homedir(), ".freedomloader", "logs");
|
||||||
|
}
|
||||||
|
|
||||||
// Création du dossier logs s’il n’existe pas encore
|
// Création du dossier logs s’il n’existe pas encore
|
||||||
if (!fs.existsSync(logDir)) fs.mkdirSync(logDir);
|
//if (!fs.existsSync(logDir)) fs.mkdirSync(logDir); OBSOLETE
|
||||||
|
|
||||||
|
fs.mkdirSync(logDir, { recursive: true }); // Evite les erreurs
|
||||||
|
|
||||||
|
|
||||||
// Fonction utilitaire pour générer une ligne indiquant le début d’une session de logs
|
// Fonction utilitaire pour générer une ligne indiquant le début d’une session de logs
|
||||||
function getSessionStartLine() {
|
function getSessionStartLine() {
|
||||||
@@ -95,4 +106,5 @@ module.exports = {
|
|||||||
logger,
|
logger,
|
||||||
logSessionStart,
|
logSessionStart,
|
||||||
logSessionEnd,
|
logSessionEnd,
|
||||||
|
logDir,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ 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.06.30.exe');
|
const ytDlpPath = path.join(process.resourcesPath, 'yt-dlp 2025.08.27.exe');
|
||||||
|
|
||||||
router.post("/", (req, res) => {
|
router.post("/", (req, res) => {
|
||||||
try {
|
try {
|
||||||
@@ -76,13 +76,30 @@ router.post("/", (req, res) => {
|
|||||||
// Construction du tableau d'arguments à passer à yt-dlp
|
// Construction du tableau d'arguments à passer à yt-dlp
|
||||||
// --no-continue pour forcer un téléchargement propre
|
// --no-continue pour forcer un téléchargement propre
|
||||||
// --restrict-filenames pour éviter les caractères problématiques dans les noms
|
// --restrict-filenames pour éviter les caractères problématiques dans les noms
|
||||||
const args = ["--no-continue", "--restrict-filenames"];
|
const args = [
|
||||||
|
"--no-continue", // pas de reprise, c'est un choix que j'ai fait voila
|
||||||
|
//"--restrict-filenames", // noms de fichiers sans caractères spéciaux (Cyrilique, accents, etc.)
|
||||||
|
"--no-overwrites", // évite d'écraser un fichier existant
|
||||||
|
"--embed-thumbnail", // ajoute la pochette
|
||||||
|
"--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
|
||||||
|
"--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
|
||||||
if (options.audioOnly) {
|
if (options.audioOnly) {
|
||||||
args.push("--extract-audio", "--audio-format", "mp3");
|
args.push(
|
||||||
|
"-f",
|
||||||
|
"bestaudio",
|
||||||
|
"--extract-audio",
|
||||||
|
"--audio-format",
|
||||||
|
"mp3",
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Correspondance entre la qualité choisie et le format à demander à yt-dlp
|
// Correspondance entre la qualité choisie et le format à demander à yt-dlp
|
||||||
const qualityMap = {
|
const qualityMap = {
|
||||||
best: "bestvideo+bestaudio/best",
|
best: "bestvideo+bestaudio/best",
|
||||||
|
|||||||
@@ -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.06.30.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
|
// 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
|
||||||
@@ -101,3 +101,6 @@ process.on("SIGTERM", () => { // Capture kill ou arrêt du process
|
|||||||
|
|
||||||
// Export de la fonction startServer pour permettre son appel depuis d’autres fichiers
|
// Export de la fonction startServer pour permettre son appel depuis d’autres fichiers
|
||||||
module.exports = { startServer };
|
module.exports = { startServer };
|
||||||
|
|
||||||
|
const { startRPC } = require("./discordRPC");
|
||||||
|
startRPC();
|
||||||
|
|||||||