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()
|
val item = history.getHistoryImpl()
|
||||||
|
|
||||||
if (dbHistory == null) {
|
if (dbHistory == null) {
|
||||||
val chapter = handler.awaitList { chaptersQueries.getChapterByUrl(history.url) }
|
// KMK -->
|
||||||
.find { it.manga_id == manga.id }
|
val chapter = handler.awaitList { chaptersQueries.getChapterByUrlAndMangaId(history.url, manga.id) }
|
||||||
|
.firstOrNull()
|
||||||
|
// KMK <--
|
||||||
return@mapNotNull if (chapter == null) {
|
return@mapNotNull if (chapter == null) {
|
||||||
// Chapter doesn't exist; skip
|
// Chapter doesn't exist; skip
|
||||||
null
|
null
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue