mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-10 06:27:49 +01:00
Fix download progress indicator (#8188)
This commit is contained in:
parent
a3afb35539
commit
b1e104319f
1 changed files with 2 additions and 1 deletions
|
@ -316,13 +316,14 @@ class Downloader(
|
|||
val pageListObservable = if (download.pages == null) {
|
||||
// Pull page list from network and add them to download object
|
||||
download.source.fetchPageList(download.chapter)
|
||||
.doOnNext { pages ->
|
||||
.map { pages ->
|
||||
if (pages.isEmpty()) {
|
||||
throw Exception(context.getString(R.string.page_list_empty_error))
|
||||
}
|
||||
// Don't trust index from source
|
||||
val reIndexedPages = pages.mapIndexed { index, page -> Page(index, page.url, page.imageUrl, page.uri) }
|
||||
download.pages = reIndexedPages
|
||||
reIndexedPages
|
||||
}
|
||||
} else {
|
||||
// Or if the page list already exists, start from the file
|
||||
|
|
Loading…
Reference in a new issue