From 82364cb41a8dfd6bfe0d631ec95be9dad7f1843a Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Sat, 4 Nov 2023 01:29:10 +0100 Subject: [PATCH] Check for all downloaded pages during a chapter download In case a chapter is marked as downloaded, but the download folder exists already, the chapter did not get downloaded again. This could cause issues in case the previous download was failed or has missing pages. Instead of only checking if the folder exists, each page should be checked individually This was previously done and was incorrectly changed with 1c9a139006f7a9e399c964b2a88650fb757d8369. --- .../manga/impl/download/fileProvider/impl/FolderProvider.kt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/fileProvider/impl/FolderProvider.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/fileProvider/impl/FolderProvider.kt index cf9f4bd2a0..9035ad7d26 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/fileProvider/impl/FolderProvider.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/download/fileProvider/impl/FolderProvider.kt @@ -30,11 +30,6 @@ class FolderProvider(mangaId: Int, chapterId: Int) : ChaptersFilesProvider(manga val chapterDir = getChapterDownloadPath(mangaId, chapterId) val folder = File(chapterDir) - val alreadyDownloaded = folder.exists() - if (alreadyDownloaded) { - return true - } - val downloadSucceeded = super.downloadImpl(download, scope, step) if (!downloadSucceeded) { return false