chore (MangaRestorer): use getChapterByUrlAndMangaId directly instead of getChapterByUrl then find
This commit is contained in:
parent
f2bf5d8664
commit
58dc3b3e79
1 changed files with 4 additions and 2 deletions
|
|
@ -397,8 +397,10 @@ class MangaRestorer(
|
|||
val item = history.getHistoryImpl()
|
||||
|
||||
if (dbHistory == null) {
|
||||
val chapter = handler.awaitList { chaptersQueries.getChapterByUrl(history.url) }
|
||||
.find { it.manga_id == manga.id }
|
||||
// KMK -->
|
||||
val chapter = handler.awaitList { chaptersQueries.getChapterByUrlAndMangaId(history.url, manga.id) }
|
||||
.firstOrNull()
|
||||
// KMK <--
|
||||
return@mapNotNull if (chapter == null) {
|
||||
// Chapter doesn't exist; skip
|
||||
null
|
||||
|
|
|
|||
Loading…
Reference in a new issue