Fetch downloaded chapters page again in case the stored file can't be retrieved (#640)

In case the file could not be retrieved, the page retrieve just failed and wasn't triggered again.
In case of the downloader, the chapter download just kept failing 3 times and was aborted
This commit is contained in:
schroda
2023-08-06 02:10:02 +02:00
committed by GitHub
parent dbdb787076
commit 6fd291c7e3
@@ -88,8 +88,12 @@ object Page {
val fileName = getPageName(index)
if (chapterEntry[ChapterTable.isDownloaded]) {
return ChapterDownloadHelper.getImage(mangaId, chapterId, index)
try {
if (chapterEntry[ChapterTable.isDownloaded]) {
return ChapterDownloadHelper.getImage(mangaId, chapterId, index)
}
} catch (_: Exception) {
// ignore and fetch again
}
val cacheSaveDir = getChapterCachePath(mangaId, chapterId)