Enhancements

pull/204/head v3.17.0
Andrew 2 years ago
parent 672bd5c954
commit 0b51534b3d

@ -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 */

@ -10,12 +10,12 @@
<p>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.</p>
<p>✔️ Supports Light/Dark/Transparent mode</p>
<p>✔️ Supports high quality video resolutions</p>
<p>✔️ Supports audio extraction in multiple formats</p>
<p>✔️ Supports playlist downloads</p>
<p>✔️ Supports downloading particular ranges</p>
<p>✔️ Supports downloading subtitles</p>
<p>✔️ Supports multiple themes</p>
<p>✔️ Completely free and open source</p>
<p>✔️ Fast download speeds</p>
</description>

@ -95,7 +95,7 @@
<!-- Video tab -->
<div id="videoList">
<div class="separationBox">
<h2>Video</h2>
<h2 id="videoHeader">Video</h2>
<label class="formatSelect">Select Format </label>
<select id="videoFormatSelect" class="select">
</select>
@ -104,7 +104,7 @@
<!-- Audio options for video -->
<div id="audioForVideo">
<h2>Audio</h2>
<h2 id="audioHeader">Audio</h2>
<label class="formatSelect">Select Audio Format </label>
<select id="audioForVideoFormatSelect" class="select">
</select>

4
package-lock.json generated

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

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

@ -261,7 +261,7 @@ async function getInfo(url) {
// Cleaning text
getId("videoFormatSelect").innerHTML = "";
getId("audioFormatSelect").innerHTML = "";
getId("audioForVideoFormatSelect").innerHTML = "";
getId("audioForVideoFormatSelect").innerHTML = `<option value="none|none">No Audio</option>`;
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 =
"<option value='" +
(format.format_id + "|" + format.ext) +
"'>" +
(i18n.__(format.format_note) ||
format.resolution ||
i18n.__("Unknown quality")) +
" | " +
format.ext +
" | " +
size +
" " +
i18n.__("MB") +
"</option>";
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 {

@ -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");

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

Loading…
Cancel
Save