fix downloading filtered out chapters (#1010)

This commit is contained in:
Seishirou101 2021-09-29 23:24:36 +00:00 committed by GitHub
parent a9faeacc6f
commit 7695f0b51d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,7 +32,7 @@ fun syncChaptersWithSource(
}
val downloadManager: DownloadManager = Injekt.get()
val chapterFilter: ChapterFilter = Injekt.get()
// Chapters from db.
val dbChapters = db.getChapters(manga).executeAsBlocking()
@ -161,8 +161,10 @@ fun syncChaptersWithSource(
} else manga.last_update = newestChapterDate
db.updateLastUpdated(manga).executeAsBlocking()
}
return Pair(toAdd.subtract(readded).toList(), toDelete - readded)
return Pair(
chapterFilter.filterChaptersByScanlators(toAdd.subtract(readded).toList(), manga),
toDelete - readded
)
}
// checks if the chapter in db needs updated