start polling once downloads initiated

This commit is contained in:
huangjx
2022-04-24 15:50:09 +08:00
parent 507b43ca3b
commit 58a0be2319
2 changed files with 10 additions and 5 deletions

View File

@@ -58,6 +58,10 @@ export default {
let formData = helper.getData(formWrapper);
let inputValue = formData["text-input-value"].trim();
let message;
if (!helper.isURL(inputValue) && !helper.isMagnetURI(inputValue)) {
helper.error(t("ncdownloader", inputValue + " is Invalid"));
return;
}
if (formData.type === "youtube-dl") {
formData["audio-only"] = "";
formData["extension"] = "";
@@ -68,10 +72,11 @@ export default {
}
}
message = helper.t("Download task started!");
}
if (!helper.isURL(inputValue) && !helper.isMagnetURI(inputValue)) {
helper.error(t("ncdownloader", inputValue + " is Invalid"));
return;
helper.pollingYoutube();
helper.setContentTableType("youtube-dl-downloads");
} else {
helper.polling();
helper.setContentTableType("active-downloads");
}
if (message) {
helper.info(message);

View File

@@ -7,7 +7,7 @@ export default {
event.stopPropagation();
event.preventDefault();
let element = event.target;
helper.hideDownload();
//helper.hideDownload();
let currentType = helper.getContentTableType();
let path = element.getAttribute("path");
let name = element.getAttribute("id");