diff --git a/html/playlist.html b/html/playlist.html index 09e076e..983f4c6 100644 --- a/html/playlist.html +++ b/html/playlist.html @@ -66,6 +66,7 @@ Select Video Format Best + Config file format 144p 240p 360p diff --git a/src/playlist.js b/src/playlist.js index 5cc7d7d..1f9d8fd 100644 --- a/src/playlist.js +++ b/src/playlist.js @@ -76,9 +76,13 @@ function download(type) { if (type === "video") { quality = getId("select").value; if (quality === "best") { - format = "bv*+ba/best"; - } else { - format = `"mp4[height<=${quality}]+m4a/mp4[height<=${quality}]/bv[height<=${quality}]+ba/best[height<=${quality}]/best"`; + format = "-f bv*+ba/best"; + } + else if (quality === "useConfig"){ + format = "" + } + else { + format = `-f "mp4[height<=${quality}]+m4a/mp4[height<=${quality}]/bv[height<=${quality}]+ba/best[height<=${quality}]/best"`; } } else { format = getId("audioSelect").value; @@ -89,7 +93,6 @@ function download(type) { if (type === "video") { downloadProcess = ytdlp.exec( [ - "-f", format, "--yes-playlist", "-o", diff --git a/src/preferences.js b/src/preferences.js index 297006c..480b0cb 100644 --- a/src/preferences.js +++ b/src/preferences.js @@ -44,6 +44,11 @@ enabledTransparent.addEventListener("change", (event) => { } }); +const localEnabledTransparent = localStorage.getItem("enabledTransparent"); +if (localEnabledTransparent == "true") { + enabledTransparent.checked = true; +} + // Selecting config directory getId("configBtn").addEventListener("click", () => { @@ -75,10 +80,6 @@ if (configPath) { // Language settings -const localEnabledTransparent = localStorage.getItem("enabledTransparent"); -if (localEnabledTransparent == "true") { - enabledTransparent.checked = true; -} const language = localStorage.getItem("language"); if (language) {