mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-06 03:50:04 +02:00
update
This commit is contained in:
parent
fea0280f1e
commit
c6a075e56d
1 changed files with 2 additions and 0 deletions
|
@ -2390,12 +2390,14 @@ function goToURLOrAlertError(jsonURL, data) {
|
|||
}
|
||||
|
||||
function downloadURL(url, filename) {
|
||||
modal.showPleaseWait();
|
||||
filename = clean_name(filename) + '.' + clean_name(url.split(/[#?]/)[0].split('.').pop().trim());
|
||||
console.log('downloadURL start ', url, filename);
|
||||
var loaded = 0;
|
||||
var contentLength = 0;
|
||||
fetch(url)
|
||||
.then(response => {
|
||||
modal.hidePleaseWait();
|
||||
avideoToastSuccess('Download Start');
|
||||
const contentEncoding = response.headers.get('content-encoding');
|
||||
const contentLength = response.headers.get(contentEncoding ? 'x-file-size' : 'content-length');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue