mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Improve download from CDN
This commit is contained in:
parent
fc693f0450
commit
a43ca7f0b5
7 changed files with 186 additions and 6 deletions
|
@ -2242,14 +2242,24 @@ function downloadURL(url, filename) {
|
|||
});
|
||||
}
|
||||
|
||||
function downloadURLOrAlertError(jsonURL, data, filename) {
|
||||
var downloadURLOrAlertErrorInterval;
|
||||
function downloadURLOrAlertError(jsonURL, data, filename, progress) {
|
||||
modal.showPleaseWait();
|
||||
avideoToastInfo('Converting');
|
||||
downloadURLOrAlertErrorInterval = setInterval(function(){
|
||||
$.ajax({
|
||||
url: progress,
|
||||
success: function (response) {
|
||||
console.log(response);
|
||||
}
|
||||
});
|
||||
});
|
||||
$.ajax({
|
||||
url: jsonURL,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
success: function (response) {
|
||||
clearInterval(downloadURLOrAlertErrorInterval);
|
||||
if (response.error) {
|
||||
avideoAlertError(response.msg);
|
||||
modal.hidePleaseWait();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue