From 8a4c717d248f9265251e5083abeb5a0f4616c801 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Sat, 4 Nov 2023 23:10:06 +0100 Subject: [PATCH] Check for all downloaded pages during a chapter download (#752) In case a chapter is marked as not downloaded, but the download folder exists already, the chapter did not get downloaded again. This could cause issues in case the previous download 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 cf9f4bd2..9035ad7d 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