restoring with clean db and not installed extensions work

This commit is contained in:
Aria Moradi
2021-08-21 00:18:03 +04:30
parent 2586202772
commit d70e68495a
3 changed files with 131 additions and 34 deletions

View File

@@ -46,12 +46,12 @@ object Chapter {
}
private suspend fun getSourceChapters(mangaId: Int): List<ChapterDataClass> {
val mangaDetails = getManga(mangaId)
val source = getHttpSource(mangaDetails.sourceId.toLong())
val manga = getManga(mangaId)
val source = getHttpSource(manga.sourceId.toLong())
val chapterList = source.fetchChapterList(
SManga.create().apply {
title = mangaDetails.title
url = mangaDetails.url
title = manga.title
url = manga.url
}
).awaitSingle()
@@ -69,7 +69,7 @@ object Chapter {
it[scanlator] = fetchedChapter.scanlator
it[chapterIndex] = index + 1
it[manga] = mangaId
it[ChapterTable.manga] = mangaId
}
} else {
ChapterTable.update({ ChapterTable.url eq fetchedChapter.url }) {
@@ -79,7 +79,7 @@ object Chapter {
it[scanlator] = fetchedChapter.scanlator
it[chapterIndex] = index + 1
it[manga] = mangaId
it[ChapterTable.manga] = mangaId
}
}
}