mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
Add newer methods to StubSource
Co-Authored-By: arkon <4098258+arkon@users.noreply.github.com>
This commit is contained in:
parent
8f020083d4
commit
3ee2b25cdb
1 changed files with 15 additions and 0 deletions
|
@ -13,6 +13,8 @@ import eu.kanade.tachiyomi.source.online.all.MangaDex
|
|||
import eu.kanade.tachiyomi.source.online.english.KireiCake
|
||||
import eu.kanade.tachiyomi.source.online.english.MangaPlus
|
||||
import rx.Observable
|
||||
import tachiyomi.source.model.ChapterInfo
|
||||
import tachiyomi.source.model.MangaInfo
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
|
||||
open class SourceManager(private val context: Context) {
|
||||
|
@ -87,19 +89,32 @@ open class SourceManager(private val context: Context) {
|
|||
LocalSource(context),
|
||||
)
|
||||
|
||||
@Suppress("OverridingDeprecatedMember")
|
||||
inner class StubSource(override val id: Long) : Source {
|
||||
|
||||
override val name: String
|
||||
get() = extensionManager.getStubSource(id)?.name ?: id.toString()
|
||||
|
||||
override suspend fun getMangaDetails(manga: MangaInfo): MangaInfo {
|
||||
throw getSourceNotInstalledException()
|
||||
}
|
||||
|
||||
override fun fetchMangaDetails(manga: SManga): Observable<SManga> {
|
||||
return Observable.error(getSourceNotInstalledException())
|
||||
}
|
||||
|
||||
override suspend fun getChapterList(manga: MangaInfo): List<ChapterInfo> {
|
||||
throw getSourceNotInstalledException()
|
||||
}
|
||||
|
||||
override fun fetchChapterList(manga: SManga): Observable<List<SChapter>> {
|
||||
return Observable.error(getSourceNotInstalledException())
|
||||
}
|
||||
|
||||
override suspend fun getPageList(chapter: ChapterInfo): List<tachiyomi.source.model.Page> {
|
||||
throw getSourceNotInstalledException()
|
||||
}
|
||||
|
||||
override fun fetchPageList(chapter: SChapter): Observable<List<Page>> {
|
||||
return Observable.error(getSourceNotInstalledException())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue