mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
Handle 1000+ pages properly in the downloader
Co-Authored-By: jobobby04 <17078382+jobobby04@users.noreply.github.com>
This commit is contained in:
parent
60ab0d2fa7
commit
9ba9a51f79
1 changed files with 3 additions and 1 deletions
|
@ -406,7 +406,9 @@ class Downloader(
|
|||
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")
|
||||
|
||||
// Delete temp file if it exists.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue