Config format for playlist videos

pull/90/head
aandrew-me 3 years ago
parent ab25e33422
commit 94f179e79b

@ -66,6 +66,7 @@
<label id="videoFormat">Select Video Format </label>
<select id="select">
<option value="best" id="bestVideoOption">Best</option>
<option value="useConfig">Config file format</option>
<option value="144">144p</option>
<option value="240">240p</option>
<option value="360">360p</option>

@ -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",

@ -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) {

Loading…
Cancel
Save