Filter out chapter entries with duplicate URLs (fixes #3552)
(cherry picked from commit 0d15cbe334de7f62cb3a5e1fc67bebb5261df86b)
This commit is contained in:
parent
35ed8e2d34
commit
0fe8990f99
@ -38,7 +38,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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user