Skip to content

Commit

Permalink
Check for all downloaded pages during a chapter download
Browse files Browse the repository at this point in the history
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 1c9a139.
  • Loading branch information
schroda committed Nov 4, 2023
1 parent 4324373 commit 82364cb
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 82364cb

Please sign in to comment.