mirror of
https://github.com/keiyoushi/extensions-source.git
synced 2024-11-22 10:22:47 +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 {
|
||||
extName = 'Com-X'
|
||||
extClass = '.ComX'
|
||||
extVersionCode = 29
|
||||
extVersionCode = 30
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
@ -26,6 +26,7 @@ import okhttp3.CookieJar
|
||||
import okhttp3.FormBody
|
||||
import okhttp3.Headers
|
||||
import okhttp3.HttpUrl
|
||||
import okhttp3.HttpUrl.Companion.toHttpUrl
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.Request
|
||||
import okhttp3.Response
|
||||
@ -167,16 +168,12 @@ class ComX : ParsedHttpSource() {
|
||||
// Search
|
||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||
if (query.isNotEmpty()) {
|
||||
return POST(
|
||||
"$baseUrl/index.php?do=search",
|
||||
body = FormBody.Builder()
|
||||
.add("do", "search")
|
||||
.add("subaction", "search")
|
||||
.add("story", query)
|
||||
.add("search_start", page.toString())
|
||||
.build(),
|
||||
headers = headers,
|
||||
)
|
||||
val url = baseUrl.toHttpUrl().newBuilder().apply {
|
||||
addPathSegment("search")
|
||||
addPathSegment(query)
|
||||
addPathSegments("page/$page")
|
||||
}.build()
|
||||
return GET(url, headers)
|
||||
}
|
||||
val mutableGenre = mutableListOf<String>()
|
||||
val mutableType = mutableListOf<String>()
|
||||
|
Loading…
Reference in New Issue
Block a user