diff --git a/downloader.ts b/downloader.ts index 811bfd3..f24cd59 100644 --- a/downloader.ts +++ b/downloader.ts @@ -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; diff --git a/public/index.html b/public/index.html index 36b4eeb..0194684 100644 --- a/public/index.html +++ b/public/index.html @@ -42,7 +42,7 @@ try { let info = await api(`/status/${id}`); result.style.display = "flex"; - result.innerHTML = `
${info.file.name} ulož.to
${parse_size(info.file.size)}
${new_url} Stáhnout
`; + result.innerHTML = `
${info.file.name} ulož.to
${parse_size(info.file.size)}
${new_url} Stáhnout
`; } catch { alert("Neplatná URL!"); } diff --git a/urlpool.ts b/urlpool.ts index b6df5e3..3c4c46a 100644 --- a/urlpool.ts +++ b/urlpool.ts @@ -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) {