mirror of
https://github.com/mihonapp/mihon.git
synced 2025-10-19 17:49:44 +02:00
Downloader: Don't trust index provided by source (#8122)
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user