Changes and fixes

pull/17/head
aandrew-me 3 years ago
parent 89915672b8
commit 046e90bcd4

@ -53,7 +53,7 @@ input[type="text"]{
color:white;
position: absolute;
top:15px;
right:120px;
right:210px;
font-size: large;
cursor: pointer;
}

@ -99,6 +99,7 @@ body {
#pasteUrl{
display:none;
margin-top:10px;
}
.item {

@ -79,7 +79,7 @@
<p id="title">Title </p>
<div id="videoList">
<label>Select Format </label>
<label class="formatSelect">Select Format </label>
<select id="videoFormatSelect">
</select>
<br>
@ -90,7 +90,7 @@
<div id="audioList">
<div id="audioPresent">
<label>Select Format </label>
<label class="formatSelect">Select Format </label>
<select id="audioFormatSelect">
</select>
<br>
@ -121,7 +121,7 @@
<!-- Extraction options start -->
<h2>Extract Audio from Video</h2>
<label>Select Format </label>
<label class="formatSelect">Select Format </label>
<select id="extractSelection">
<option value="mp3">Mp3</option>
<option value="aac">Aac</option>

@ -37,6 +37,8 @@
<select id="select" onchange="changeLanguage()">
<option value="en">English</option>
<option value="ru">Русский</option>
<option value="fi">Finnish</option>
<option value="uk">Українська</option>
</select>
<script>

@ -30,7 +30,6 @@ let rangeCmd = "";
// let subs = ""
// let autoSubs = ""
let rangeOption = "--download-sections";
let willBeSaved = true;
function getId(id) {
return document.getElementById(id);
@ -353,7 +352,7 @@ async function getInfo(url) {
} else {
getId("loadingWrapper").style.display = "none";
getId("incorrectMsg").textContent = i18n.__(
"Some error has occured. Check your connection and use correct URL"
"Some error has occured. Check your network and use correct URL"
);
}
});
@ -476,6 +475,7 @@ function manageAdvanced(duration) {
//////////////////////////////
function download(type) {
let willBeSaved = true;
manageAdvanced(duration);
const url = getId("url").value;
let ext;
@ -528,7 +528,7 @@ function download(type) {
`;
getId("list").innerHTML += newItem;
getId("loadingWrapper").style.display = "none";
getId(randomId + "prog").textContent = "Preparing...";
getId(randomId + "prog").textContent = i18n.__("Preparing...");
getId(randomId + ".close").addEventListener("click", () => {
if (getId(randomId)) {
@ -633,22 +633,21 @@ function download(type) {
getId(randomId + ".close").addEventListener("click", () => {
willBeSaved = false;
console.log("Cancelled");
controller.abort();
controller.abort()
});
downloadProcess
.on("progress", (progress) => {
// if (progress.percent == 100) {
// getId(randomId + "prog").textContent =
// i18n.__("Processing") + "...";
// } else {
if (progress.percent == 100) {
getId(randomId + "prog").textContent =
i18n.__("Processing") + "...";
} else {
getId(randomId + "prog").textContent = `${i18n.__(
"Progress"
)}: ${progress.percent}% ${i18n.__("Speed")}: ${
progress.currentSpeed || 0
}`;
// }
}
const items = JSON.parse(localStorage.getItem("itemList"));
// Clearing item from localstorage

@ -11,8 +11,9 @@ getId("pasteUrl").textContent = i18n.__("Click to paste video URL or ID [Ctrl +
querySelector("#popup p").textContent = i18n.__("yt-dlp is being downloaded")
getId("preferenceWin").textContent = i18n.__("Preferences")
getId("aboutWin").textContent = i18n.__("About")
querySelector("#videoList label").textContent = i18n.__("Select Format ")
querySelector("#audioList label").textContent = i18n.__("Select Format ")
document.querySelectorAll(".formatSelect").forEach(element => {
element.textContent = i18n.__("Select Format ")
});
getId("videoDownload").textContent = i18n.__("Download")
getId("audioDownload").textContent = i18n.__("Download")
getId("advancedVideoToggle").textContent = i18n.__("More options")

@ -35,7 +35,7 @@
"Some error has occured. Hover to see details":"Some error has occured. Hover to see details",
"File saved successfully":"File saved successfully",
"File saved. Click to Open":"File saved. Click to Open",
"Preparing":"Preparing",
"Preparing...":"Preparing...",
"Progress":"Progress",
"Speed":"Speed",
"Quality":"Quality",

Loading…
Cancel
Save