Fixed progress for sequential downloads.

This commit is contained in:
Koen J 2024-08-29 18:06:53 +02:00
parent 0b4770188c
commit 0281da1c5a
2 changed files with 2 additions and 2 deletions

View file

@ -767,7 +767,7 @@ class VideoDownload {
totalRead += read;
readSinceLastSpeedTest += read;
if (totalRead / progressRate > lastProgressCount) {
if (totalRead.toDouble() / progressRate > lastProgressCount) {
onProgress(sourceLength, totalRead, lastSpeed);
lastProgressCount++;
}

View file

@ -54,7 +54,7 @@ class DownloadService : Service() {
.readTimeout(Duration.ofMinutes(30))
.writeTimeout(Duration.ofMinutes(30))
.connectTimeout(Duration.ofSeconds(30))
.callTimeout(Duration.ofMinutes(30)))
.callTimeout(Duration.ofMinutes(0)))
private var _started = false;