fix: Should probably also sync chapters filtered by scanlators, just in

case
This commit is contained in:
Ahmad Ansori Palembani 2024-06-21 07:07:56 +07:00
parent af02f34167
commit 9879004157
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6

View file

@ -46,7 +46,7 @@ suspend fun syncChaptersWithSource(
val downloadManager: DownloadManager by injectLazy() val downloadManager: DownloadManager by injectLazy()
// Chapters from db. // Chapters from db.
val dbChapters = getChapters.await(manga) val dbChapters = getChapters.await(manga, false)
val sourceChapters = rawSourceChapters val sourceChapters = rawSourceChapters
.distinctBy { it.url } .distinctBy { it.url }
@ -183,7 +183,7 @@ suspend fun syncChaptersWithSource(
var mangaUpdate: MangaUpdate? = null var mangaUpdate: MangaUpdate? = null
// Set this manga as updated since chapters were changed // Set this manga as updated since chapters were changed
val newestChapterDate = getChapters.await(manga) val newestChapterDate = getChapters.await(manga, false)
.maxOfOrNull { it.date_upload } ?: 0L .maxOfOrNull { it.date_upload } ?: 0L
if (newestChapterDate == 0L) { if (newestChapterDate == 0L) {
if (toAdd.isNotEmpty()) { if (toAdd.isNotEmpty()) {