More mangadex work (search is still not working)
This commit is contained in:
parent
f312e51687
commit
af0c037845
@ -3,16 +3,25 @@ package eu.kanade.tachiyomi.source.online.all
|
|||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import androidx.preference.PreferenceScreen
|
import androidx.preference.PreferenceScreen
|
||||||
import eu.kanade.tachiyomi.source.ConfigurableSource
|
import eu.kanade.tachiyomi.source.ConfigurableSource
|
||||||
|
import eu.kanade.tachiyomi.source.model.FilterList
|
||||||
|
import eu.kanade.tachiyomi.source.model.MangasPage
|
||||||
import eu.kanade.tachiyomi.source.online.HttpSource
|
import eu.kanade.tachiyomi.source.online.HttpSource
|
||||||
import eu.kanade.tachiyomi.source.online.UrlImportableSource
|
import eu.kanade.tachiyomi.source.online.UrlImportableSource
|
||||||
import exh.source.DelegatedHttpSource
|
import exh.source.DelegatedHttpSource
|
||||||
|
import exh.util.urlImportFetchSearchManga
|
||||||
|
import rx.Observable
|
||||||
|
|
||||||
class MangaDex(delegate: HttpSource) :
|
class MangaDex(delegate: HttpSource) :
|
||||||
DelegatedHttpSource(delegate),
|
DelegatedHttpSource(delegate),
|
||||||
ConfigurableSource,
|
ConfigurableSource,
|
||||||
UrlImportableSource {
|
UrlImportableSource {
|
||||||
|
|
||||||
override val matchingHosts: List<String> = listOf("mangadex.org")
|
override val matchingHosts: List<String> = listOf("mangadex.org", "www.mangadex.org")
|
||||||
|
|
||||||
|
override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable<MangasPage> =
|
||||||
|
urlImportFetchSearchManga(query) {
|
||||||
|
super.fetchSearchManga(page, query, filters)
|
||||||
|
}
|
||||||
|
|
||||||
override fun mapUrlToMangaUrl(uri: Uri): String? {
|
override fun mapUrlToMangaUrl(uri: Uri): String? {
|
||||||
val lcFirstPathSegment = uri.pathSegments.firstOrNull()?.toLowerCase() ?: return null
|
val lcFirstPathSegment = uri.pathSegments.firstOrNull()?.toLowerCase() ?: return null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user