diff --git a/README-EN.md b/README-EN.md index 6185883..c438a9c 100644 --- a/README-EN.md +++ b/README-EN.md @@ -1,6 +1,12 @@ # Freedom Loader -![Static Badge](https://img.shields.io/badge/Version-1.0.0-blue?style=flat&logo=Test) + + +![Static Badge](https://img.shields.io/badge/Release-1.0.0-blue?style=flat&logo=Test) + + + +![Static Badge](https://img.shields.io/badge/Build-1.0.1--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 diff --git a/README.md b/README.md index fa8f82e..20e6059 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,12 @@ # Freedom Loader -![Static Badge](https://img.shields.io/badge/Version-1.0.0-blue?style=flat&logo=Test) + +![Static Badge](https://img.shields.io/badge/Release-1.0.0-blue?style=flat&logo=Test) + + + +![Static Badge](https://img.shields.io/badge/Build-1.0.1--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 diff --git a/main.js b/main.js index f25a12e..af0e2b8 100644 --- a/main.js +++ b/main.js @@ -24,17 +24,22 @@ let mainWindow; async function createWindow() { logger.info("Creation de la fenetre..."); + if (mainWindow) { logger.warn("La fenetre existe deja, pas de nouvelle creation"); return; } mainWindow = new BrowserWindow({ - width: 1000, - height: 700, + title: "Freedom Loader", + width: 750, + height: 800, + minWidth: 750, + minHeight: 800, webPreferences: { nodeIntegration: false, contextIsolation: true, }, + // titleBarStyle: 'hidden', }); try { @@ -71,4 +76,4 @@ app.on("window-all-closed", () => { app.on("before-quit", () => { logSessionEnd(); -}); \ No newline at end of file +}); diff --git a/public/assets/icons/GitHub Icon.ico b/public/assets/icons/GitHub Icon.ico new file mode 100644 index 0000000..798a024 Binary files /dev/null and b/public/assets/icons/GitHub Icon.ico differ diff --git a/public/assets/icons/GitHub Icon.svg b/public/assets/icons/GitHub Icon.svg new file mode 100644 index 0000000..a8d1174 --- /dev/null +++ b/public/assets/icons/GitHub Icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/index.html b/public/index.html index 5d76ae1..f25656b 100644 --- a/public/index.html +++ b/public/index.html @@ -41,8 +41,13 @@ + diff --git a/public/styles/layout/videoinfo.css b/public/styles/layout/videoinfo.css index b47fc17..bc8a43c 100644 --- a/public/styles/layout/videoinfo.css +++ b/public/styles/layout/videoinfo.css @@ -4,7 +4,7 @@ margin-left: auto; margin-right: auto; padding: 1.5em 2em; - background-color: #fff; + background-color: var(--infos-box-color); border-radius: 12px; box-shadow: 0 8px 16px rgba(0,0,0,0.1); color: #222; diff --git a/public/styles/styles.css b/public/styles/styles.css index 8651900..1f8f64c 100644 --- a/public/styles/styles.css +++ b/public/styles/styles.css @@ -27,7 +27,7 @@ body { background-attachment: fixed; */ width: 100%; height: 100%; - color: #F8FAFC; + color: var(--default-text-color); display: flex; justify-content: center; align-items: center; diff --git a/public/styles/variables.css b/public/styles/variables.css index 8494afc..fb2b848 100644 --- a/public/styles/variables.css +++ b/public/styles/variables.css @@ -1,9 +1,11 @@ :root{ --background-color : #0F172A; + --infos-box-color: #f1f1f1 ; --title-color: ; --subtitle-color : #a3aab4; --mp3-text-color: #0F172A; --default-text-color: #F8FAFC; --checkbox-pulse-color:#9bbcf1; + } \ No newline at end of file diff --git a/server/routes/download.js b/server/routes/download.js index af916b7..bed0fe9 100644 --- a/server/routes/download.js +++ b/server/routes/download.js @@ -69,8 +69,48 @@ router.post("/", (req, res) => { args.push("--write-subs", "--sub-lang", "en"); } - // qualité souhaitée - args.push("-f", options.quality); + // // qualité souhaitée + // args.push("-f", options.quality); + + // let format; + // if (options.quality === "best") { + // format = "bestvideo+bestaudio/best"; + // } else if (options.quality === "worst") { + // format = "worstvideo+worstaudio/worst"; + // } else { + // format = "best"; // fallback + // } + // args.push("-f", format); + + args.push("--no-continue"); + + let format; + + switch (options.quality) { + case "best": + format = "bestvideo+bestaudio/best"; + break; + case "medium": + // qualité moyenne, ex: 720p vidéo + meilleur audio + format = "bestvideo[height<=720]+bestaudio/best[height<=720]"; + break; + case "worst": + format = "worstvideo+worstaudio/worst"; + break; + case "1080": + format = "bestvideo[height<=1080]+bestaudio/best[height<=1080]"; + break; + case "720": + format = "bestvideo[height<=720]+bestaudio/best[height<=720]"; + break; + case "480": + format = "bestvideo[height<=480]+bestaudio/best[height<=480]"; + break; + default: + format = "best"; + } + args.push("-f", format); + // modèle de sortie args.push("-o", outputTemplate); // enfin, l'URL à télécharger