mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 20:31:02 -05:00
Filter out chapter entries with duplicate URLs (fixes #3552)
This commit is contained in:
parent
e381d9fc8e
commit
0d15cbe334
1 changed files with 8 additions and 6 deletions
|
@ -36,7 +36,9 @@ fun syncChaptersWithSource(
|
|||
// Chapters from db.
|
||||
val dbChapters = db.getChapters(manga).executeAsBlocking()
|
||||
|
||||
val sourceChapters = rawSourceChapters.mapIndexed { i, sChapter ->
|
||||
val sourceChapters = rawSourceChapters
|
||||
.distinctBy { it.url }
|
||||
.mapIndexed { i, sChapter ->
|
||||
Chapter.create().apply {
|
||||
copyFrom(sChapter)
|
||||
manga_id = manga.id
|
||||
|
|
Loading…
Reference in a new issue