Filter out chapter entries with duplicate URLs (fixes #3552)

This commit is contained in:
arkon 2020-08-01 16:35:52 -04:00
parent e381d9fc8e
commit 0d15cbe334

View File

@ -36,7 +36,9 @@ fun syncChaptersWithSource(
// Chapters from db. // Chapters from db.
val dbChapters = db.getChapters(manga).executeAsBlocking() val dbChapters = db.getChapters(manga).executeAsBlocking()
val sourceChapters = rawSourceChapters.mapIndexed { i, sChapter -> val sourceChapters = rawSourceChapters
.distinctBy { it.url }
.mapIndexed { i, sChapter ->
Chapter.create().apply { Chapter.create().apply {
copyFrom(sChapter) copyFrom(sChapter)
manga_id = manga.id manga_id = manga.id