diff --git a/assets/css/index.css b/assets/css/index.css index fc88f43..9edfea9 100644 --- a/assets/css/index.css +++ b/assets/css/index.css @@ -339,7 +339,7 @@ body { left: 0; right: 0; margin: auto; - top: 16%; + top: 20%; background-color: var(--box-main); border-radius: 10px; width: 80%; @@ -582,6 +582,7 @@ button { h2{ margin: 12px; + font-size: 24px; } /* Scrollbar */ diff --git a/flatpak/io.github.aandrew_me.ytdn.metainfo.xml b/flatpak/io.github.aandrew_me.ytdn.metainfo.xml index 72e3283..5b483c7 100644 --- a/flatpak/io.github.aandrew_me.ytdn.metainfo.xml +++ b/flatpak/io.github.aandrew_me.ytdn.metainfo.xml @@ -10,12 +10,12 @@

ytDownloader lets you download videos and audios of different qualities from hundreds of sites including the popular ones but not limited to Youtube, Facebook, Instagram, Tiktok, Twitter, Twitch and so on.

-

✔️ Supports Light/Dark/Transparent mode

✔️ Supports high quality video resolutions

✔️ Supports audio extraction in multiple formats

✔️ Supports playlist downloads

✔️ Supports downloading particular ranges

✔️ Supports downloading subtitles

+

✔️ Supports multiple themes

✔️ Completely free and open source

✔️ Fast download speeds

diff --git a/html/index.html b/html/index.html index 92ffb69..10d0b7b 100644 --- a/html/index.html +++ b/html/index.html @@ -95,7 +95,7 @@
-

Video

+

Video

@@ -104,7 +104,7 @@
-

Audio

+

Audio

diff --git a/package-lock.json b/package-lock.json index 7516099..9688cf3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ytdownloader", - "version": "3.16.1", + "version": "3.17.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ytdownloader", - "version": "3.16.1", + "version": "3.17.0", "license": "GPL-3.0", "dependencies": { "electron-updater": "^5.3.0", diff --git a/package.json b/package.json index 96d8474..9575473 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "yt-dlp-wrap-plus": "^2.3.18" }, "name": "ytdownloader", - "version": "3.16.2", + "version": "3.17.0", "main": "main.js", "scripts": { "start": "electron .", @@ -88,7 +88,6 @@ "snap", "rpm", "zip", - "pacman", "deb" ], "category": "Utility", diff --git a/src/renderer.js b/src/renderer.js index be3e15c..4756ae0 100644 --- a/src/renderer.js +++ b/src/renderer.js @@ -261,7 +261,7 @@ async function getInfo(url) { // Cleaning text getId("videoFormatSelect").innerHTML = ""; getId("audioFormatSelect").innerHTML = ""; - getId("audioForVideoFormatSelect").innerHTML = ""; + getId("audioForVideoFormatSelect").innerHTML = ``; const startTime = getId("startTime"); startTime.value = ""; @@ -488,7 +488,7 @@ async function getInfo(url) { if ( (format.video_ext !== "none" && - format.audio_ext === "none" && + format.acodec === "none" && !( format.video_ext === "mp4" && format.vcodec && @@ -626,30 +626,7 @@ async function getInfo(url) { format.audio_ext !== "none" || (format.acodec !== "none" && format.video_ext !== "none") ) { - let size; - if (format.filesize || format.filesize_approx) { - size = ( - Number(format.filesize || format.filesize_approx) / - 1000000 - ).toFixed(2); - } else { - size = i18n.__("Unknown size"); - } - const element = - ""; - getId("videoFormatSelect").innerHTML += element; + // Skip them } // When there is no audio @@ -940,7 +917,7 @@ function download( audioForVideoExt = audioForVideoValue.split("|")[1]; } - if ((videoExt === "mp4" && audioForVideoExt === "opus") || (videoExt === "webm" && audioForVideoExt === "m4a")) { + if ((videoExt === "mp4" && audioForVideoExt === "opus") || (videoExt === "webm" && (audioForVideoExt === "m4a" || audioForVideoExt === "mp4"))) { ext = "mkv" } else { ext = videoExt; @@ -1031,24 +1008,23 @@ function download( console.log("Filename:", filename); /**@type {string} */ - let audioFormat; + let audioFormat = "+ba"; if (audioForVideoFormat_id === "auto") { if (ext === "mp4") { if (!(audioExtensionList.length == 0)) { if (audioExtensionList.includes("m4a")) { audioFormat = "+m4a"; - } else { - audioFormat = "+ba"; } } else { audioFormat = ""; } - } else { - audioFormat = "+ba"; } - } else { + } else if (audioForVideoFormat_id === "none") { + audioFormat = "" + } + else { audioFormat = `+${audioForVideoFormat_id}`; } @@ -1159,6 +1135,8 @@ function download( ); } + console.log("Spawn args:" + downloadProcess.ytDlpProcess.spawnargs[downloadProcess.ytDlpProcess.spawnargs.length - 1]) + getId(randomId + ".close").addEventListener("click", () => { controller.abort() try { diff --git a/src/translate_index.js b/src/translate_index.js index 880e0b2..dc11f62 100644 --- a/src/translate_index.js +++ b/src/translate_index.js @@ -20,7 +20,9 @@ document.querySelectorAll(".formatSelect").forEach((element) => { getId("videoDownload").textContent = i18n.__("Download"); getId("audioDownload").textContent = i18n.__("Download"); getId("videoToggle").textContent = i18n.__("Video"); +getId("videoHeader").textContent = i18n.__("Video"); getId("audioToggle").textContent = i18n.__("Audio"); +getId("audioHeader").textContent = i18n.__("Audio"); getId("advancedVideoToggle").textContent = i18n.__("More options"); getId("advancedAudioToggle").textContent = i18n.__("More options"); getId("rangeText").textContent = i18n.__("Download particular time-range"); diff --git a/translations/en.json b/translations/en.json index 7c274f6..d707f5a 100644 --- a/translations/en.json +++ b/translations/en.json @@ -109,5 +109,6 @@ "Solarized Dark": "Solarized Dark", "Preferred video codec": "Preferred video codec", "Show more format options": "Show more format options", - "You need to give the app permission to access home directory to use this. You can do it with Flatseal by enabling the permission with text 'filesystem=home'": "You need to give the app permission to access home directory to use this. You can do it with Flatseal by enabling the permission with text 'filesystem=home'" + "You need to give the app permission to access home directory to use this. You can do it with Flatseal by enabling the permission with text 'filesystem=home'": "You need to give the app permission to access home directory to use this. You can do it with Flatseal by enabling the permission with text 'filesystem=home'", + "No Audio":"No Audio" }