feat: add BookOasis document reader and text settings
This commit is contained in:
@@ -8,7 +8,10 @@ import eu.kanade.domain.manga.model.toSManga
|
||||
import eu.kanade.tachiyomi.data.cache.CoverCache
|
||||
import eu.kanade.tachiyomi.data.download.DownloadManager
|
||||
import eu.kanade.tachiyomi.source.Source
|
||||
import eu.kanade.tachiyomi.source.bookoasis.fetchBookOasisChapters
|
||||
import eu.kanade.tachiyomi.source.bookoasis.isBookOasisSource
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import eu.kanade.tachiyomi.source.online.HttpSource
|
||||
import logcat.LogPriority
|
||||
import mihon.domain.source.models.RemoteMangaUpdate
|
||||
import tachiyomi.core.common.util.lang.withIOContext
|
||||
@@ -70,8 +73,28 @@ class UpdateMangaFromRemote(
|
||||
)
|
||||
}
|
||||
awaitUpdateFromSource(manga, update.manga, manualFetch)
|
||||
|
||||
val rawSourceChapters = if (
|
||||
fetchChapters &&
|
||||
source is HttpSource &&
|
||||
source.isBookOasisSource()
|
||||
) {
|
||||
try {
|
||||
withIOContext {
|
||||
source.fetchBookOasisChapters(manga.toSManga())
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
logcat(LogPriority.ERROR, e) {
|
||||
"BookOasis document chapter compatibility fallback failed"
|
||||
}
|
||||
update.chapters
|
||||
}
|
||||
} else {
|
||||
update.chapters
|
||||
}
|
||||
|
||||
val newChapters = syncChaptersWithSource.await(
|
||||
rawSourceChapters = update.chapters,
|
||||
rawSourceChapters = rawSourceChapters,
|
||||
manga = manga,
|
||||
source = source,
|
||||
manualFetch = manualFetch,
|
||||
|
||||
Reference in New Issue
Block a user