mirror of
https://github.com/keiyoushi/extensions-source.git
synced 2024-11-22 18:32:39 +01:00
[RU]ComX fix looping Search (#5524)
* [RU]ComX fix looping Search * addPathSegment
This commit is contained in:
parent
a88c11a359
commit
90410c44ce
@ -1,7 +1,7 @@
|
|||||||
ext {
|
ext {
|
||||||
extName = 'Com-X'
|
extName = 'Com-X'
|
||||||
extClass = '.ComX'
|
extClass = '.ComX'
|
||||||
extVersionCode = 29
|
extVersionCode = 30
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
@ -26,6 +26,7 @@ import okhttp3.CookieJar
|
|||||||
import okhttp3.FormBody
|
import okhttp3.FormBody
|
||||||
import okhttp3.Headers
|
import okhttp3.Headers
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
import okhttp3.HttpUrl.Companion.toHttpUrl
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
@ -167,16 +168,12 @@ class ComX : ParsedHttpSource() {
|
|||||||
// Search
|
// Search
|
||||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||||
if (query.isNotEmpty()) {
|
if (query.isNotEmpty()) {
|
||||||
return POST(
|
val url = baseUrl.toHttpUrl().newBuilder().apply {
|
||||||
"$baseUrl/index.php?do=search",
|
addPathSegment("search")
|
||||||
body = FormBody.Builder()
|
addPathSegment(query)
|
||||||
.add("do", "search")
|
addPathSegments("page/$page")
|
||||||
.add("subaction", "search")
|
}.build()
|
||||||
.add("story", query)
|
return GET(url, headers)
|
||||||
.add("search_start", page.toString())
|
|
||||||
.build(),
|
|
||||||
headers = headers,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
val mutableGenre = mutableListOf<String>()
|
val mutableGenre = mutableListOf<String>()
|
||||||
val mutableType = mutableListOf<String>()
|
val mutableType = mutableListOf<String>()
|
||||||
|
Loading…
Reference in New Issue
Block a user