This commit is contained in:
Jobobby04 2021-01-09 15:16:23 -05:00
parent 4afe227e02
commit 7006341fab
2 changed files with 13 additions and 7 deletions

View File

@ -171,12 +171,17 @@ class MigrationListController(bundle: Bundle? = null) :
}
if (searchResult != null && !(searchResult.url == mangaObj.url && source.id == mangaObj.source)) {
val localManga =
smartSearchEngine.networkToLocalManga(
searchResult,
source.id
)
val chapters = (if (source is EHentai) source.getChapterList(localManga.toMangaInfo(), throttleManager::throttle) else source.getChapterList(localManga.toMangaInfo()))
val localManga = smartSearchEngine.networkToLocalManga(
searchResult,
source.id
)
val chapters = if (source is EHentai) {
source.getChapterList(localManga.toMangaInfo(), throttleManager::throttle)
} else {
source.getChapterList(localManga.toMangaInfo())
}
try {
syncChaptersWithSource(db, chapters.map { it.toSChapter() }, localManga, source)
} catch (e: Exception) {

View File

@ -70,6 +70,7 @@ import eu.kanade.tachiyomi.util.view.showBar
import eu.kanade.tachiyomi.util.view.snack
import eu.kanade.tachiyomi.widget.SimpleAnimationListener
import eu.kanade.tachiyomi.widget.SimpleSeekBarListener
import exh.isEhBasedSource
import exh.util.defaultReaderType
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
@ -499,7 +500,7 @@ class ReaderActivity : BaseRxActivity<ReaderActivityBinding, ReaderPresenter>()
// If we are using EHentai/ExHentai, get a new image URL
presenter.manga?.let { m ->
val src = sourceManager.get(m.source)
if (src is EHentai) {
if (src?.isEhBasedSource() == true) {
page.imageUrl = null
}
}