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 1c9a139006.
This commit is contained in:
schroda
2023-11-04 23:10:06 +01:00
committed by GitHub
parent 442a290966
commit 8a4c717d24
@@ -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