mirror of
https://git.mihon.tech/mihonapp/mihon
synced 2024-11-23 13:45:43 +03:00
Handle 1000+ pages properly in the downloader (#8818)
This commit is contained in:
parent
12c672667c
commit
611ec8103c
1 changed files with 3 additions and 1 deletions
|
@ -376,7 +376,9 @@ class Downloader(
|
||||||
return Observable.just(page)
|
return Observable.just(page)
|
||||||
}
|
}
|
||||||
|
|
||||||
val filename = String.format("%03d", page.number)
|
val digitCount = (download.pages?.size ?: 0).toString().length.coerceAtLeast(3)
|
||||||
|
|
||||||
|
val filename = String.format("%0${digitCount}d", page.number)
|
||||||
val tmpFile = tmpDir.findFile("$filename.tmp")
|
val tmpFile = tmpDir.findFile("$filename.tmp")
|
||||||
|
|
||||||
// Delete temp file if it exists.
|
// Delete temp file if it exists.
|
||||||
|
|
Loading…
Reference in a new issue