Skip to content

Commit

Permalink
Fetch downloaded chapters page again in case the stored file can't be…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
schroda authored Aug 6, 2023
1 parent dbdb787 commit 6fd291c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions server/src/main/kotlin/suwayomi/tachidesk/manga/impl/Page.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6fd291c

Please sign in to comment.