Probably fix merged manga library updates

This commit is contained in:
Jobobby04 2022-01-08 18:20:34 -05:00
parent aeed6f47a0
commit 8bd1a708d0

View File

@ -470,10 +470,12 @@ class LibraryUpdateService(
// may don't like it and they could ban the user. // may don't like it and they could ban the user.
// SY --> // SY -->
val chapterFilter = if (manga.source == MERGED_SOURCE_ID) { val chapterFilter = if (manga.source == MERGED_SOURCE_ID) {
db.getMergedMangaReferences(manga.id!!).executeAsBlocking().filterNot { it.downloadChapters }.mapNotNull { it.mangaId } db.getMergedMangaReferences(manga.id!!).executeAsBlocking()
.filterNot { it.downloadChapters }
.mapNotNull { it.mangaId } + manga.id!!
} else emptyList() } else emptyList()
// SY <-- // SY <--
downloadManager.downloadChapters(manga, /* SY --> */ chapters.filter { it.manga_id !in chapterFilter } /* SY <-- */, false) downloadManager.downloadChapters(manga, /* SY --> */ chapters.filterNot { it.manga_id in chapterFilter } /* SY <-- */, false)
} }
/** /**