Small changes
This commit is contained in:
parent
cdab2bb624
commit
6577ea99c6
|
@ -72,7 +72,7 @@ export class Downloader {
|
|||
if(result) console.log(this.pool.id, "| sending:", Math.round(result.length/1024), "kB");
|
||||
}
|
||||
};
|
||||
let interval = setInterval(wait_for_result, 100);
|
||||
let interval = setInterval(wait_for_result, 2000);
|
||||
wait_for_result();
|
||||
});
|
||||
return promise;
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
try {
|
||||
let info = await api(`/status/${id}`);
|
||||
result.style.display = "flex";
|
||||
result.innerHTML = `<div class="info"><div><b>${info.file.name}</b> <a target="_blank" class="linkback" href="https://uloz.to/file/${id}">ulož.to</a></div><small>${parse_size(info.file.size)}</small></div><div class="download"><code>${new_url}</code> <a href="${new_url}" download>Stáhnout</a></div>`;
|
||||
result.innerHTML = `<div class="info"><div><b>${info.file.name}</b> <a target="_blank" class="linkback" href="https://uloz.to/file/${id}">ulož.to</a></div><small>${parse_size(info.file.size)}</small></div><div class="download"><code>${new_url}</code> <a href="${new_url}" download="${info.file.name}">Stáhnout</a></div>`;
|
||||
} catch {
|
||||
alert("Neplatná URL!");
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ export class UrlPool {
|
|||
}
|
||||
|
||||
return(i: number, sucess: boolean = true) {
|
||||
setTimeout(() => this.used[i] = false, sucess ? random_int(1000, 5000) : random_int(5000, 60000));
|
||||
setTimeout(() => this.used[i] = false, sucess ? random_int(2000, 5000) : random_int(10000, 60000));
|
||||
}
|
||||
|
||||
add(url: string) {
|
||||
|
|
Reference in a new issue