Also search series from chapter links (#11970)
This commit is contained in:
parent
26be465c84
commit
723bce9a5a
|
@ -6,7 +6,7 @@ ext {
|
||||||
extName = 'Dynasty'
|
extName = 'Dynasty'
|
||||||
pkgNameSuffix = 'en.dynasty'
|
pkgNameSuffix = 'en.dynasty'
|
||||||
extClass = '.DynastyFactory'
|
extClass = '.DynastyFactory'
|
||||||
extVersionCode = 16
|
extVersionCode = 17
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
|
|
@ -2,9 +2,11 @@ package eu.kanade.tachiyomi.extension.en.dynasty
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.source.model.FilterList
|
import eu.kanade.tachiyomi.source.model.FilterList
|
||||||
|
import eu.kanade.tachiyomi.source.model.MangasPage
|
||||||
import eu.kanade.tachiyomi.source.model.SManga
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
|
import rx.Observable
|
||||||
|
|
||||||
class DynastySeries : DynastyScans() {
|
class DynastySeries : DynastyScans() {
|
||||||
|
|
||||||
|
@ -18,6 +20,16 @@ class DynastySeries : DynastyScans() {
|
||||||
return GET("$baseUrl/search?q=$query&classes%5B%5D=Series&sort=&page=$page", headers)
|
return GET("$baseUrl/search?q=$query&classes%5B%5D=Series&sort=&page=$page", headers)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable<MangasPage> {
|
||||||
|
if (query.startsWith("manga:chapters:")) {
|
||||||
|
val seriesName = Regex("""manga:chapters:(.*?)_ch\d+""").matchEntire(query)?.groups?.get(1)?.value
|
||||||
|
if (seriesName != null) {
|
||||||
|
return super.fetchSearchManga(page, "manga:$searchPrefix:$seriesName", filters)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return super.fetchSearchManga(page, query, filters)
|
||||||
|
}
|
||||||
|
|
||||||
override fun mangaDetailsParse(document: Document): SManga {
|
override fun mangaDetailsParse(document: Document): SManga {
|
||||||
val manga = SManga.create()
|
val manga = SManga.create()
|
||||||
manga.thumbnail_url = baseUrl + document.select("div.span2 > img").attr("src")
|
manga.thumbnail_url = baseUrl + document.select("div.span2 > img").attr("src")
|
||||||
|
|
Loading…
Reference in New Issue