mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 20:31:02 -05:00
Downloader: Don't trust index provided by source (#8122)
This commit is contained in:
parent
00f442b77e
commit
98c459a6b6
1 changed files with 3 additions and 1 deletions
|
@ -320,7 +320,9 @@ class Downloader(
|
||||||
if (pages.isEmpty()) {
|
if (pages.isEmpty()) {
|
||||||
throw Exception(context.getString(R.string.page_list_empty_error))
|
throw Exception(context.getString(R.string.page_list_empty_error))
|
||||||
}
|
}
|
||||||
download.pages = pages
|
// Don't trust index from source
|
||||||
|
val reIndexedPages = pages.mapIndexed { index, page -> Page(index, page.url, page.imageUrl, page.uri) }
|
||||||
|
download.pages = reIndexedPages
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Or if the page list already exists, start from the file
|
// Or if the page list already exists, start from the file
|
||||||
|
|
Loading…
Reference in a new issue