-
Video
+
Select Format
@@ -104,7 +104,7 @@
-
Audio
+
Select Audio Format
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 = `No Audio `;
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 =
- "" +
- (i18n.__(format.format_note) ||
- format.resolution ||
- i18n.__("Unknown quality")) +
- " | " +
- format.ext +
- " | " +
- size +
- " " +
- i18n.__("MB") +
- " ";
- 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"
}