mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-08-02 22:30:40 +00:00
Fixed progress for sequential downloads.
This commit is contained in:
parent
0b4770188c
commit
0281da1c5a
2 changed files with 2 additions and 2 deletions
|
@ -767,7 +767,7 @@ class VideoDownload {
|
||||||
totalRead += read;
|
totalRead += read;
|
||||||
|
|
||||||
readSinceLastSpeedTest += read;
|
readSinceLastSpeedTest += read;
|
||||||
if (totalRead / progressRate > lastProgressCount) {
|
if (totalRead.toDouble() / progressRate > lastProgressCount) {
|
||||||
onProgress(sourceLength, totalRead, lastSpeed);
|
onProgress(sourceLength, totalRead, lastSpeed);
|
||||||
lastProgressCount++;
|
lastProgressCount++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ class DownloadService : Service() {
|
||||||
.readTimeout(Duration.ofMinutes(30))
|
.readTimeout(Duration.ofMinutes(30))
|
||||||
.writeTimeout(Duration.ofMinutes(30))
|
.writeTimeout(Duration.ofMinutes(30))
|
||||||
.connectTimeout(Duration.ofSeconds(30))
|
.connectTimeout(Duration.ofSeconds(30))
|
||||||
.callTimeout(Duration.ofMinutes(30)))
|
.callTimeout(Duration.ofMinutes(0)))
|
||||||
|
|
||||||
private var _started = false;
|
private var _started = false;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue