FlixScans: fix search (#1010)
This commit is contained in:
parent
97dde3f788
commit
c023c40f54
@ -11,7 +11,6 @@ import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import eu.kanade.tachiyomi.source.online.HttpSource
|
||||
import kotlinx.serialization.decodeFromString
|
||||
import kotlinx.serialization.encodeToString
|
||||
import kotlinx.serialization.json.Json
|
||||
import okhttp3.Call
|
||||
import okhttp3.Callback
|
||||
@ -170,18 +169,7 @@ abstract class FlixScans(
|
||||
|
||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||
if (query.isNotEmpty()) {
|
||||
val searchBody = SearchInput(query.trim())
|
||||
.let(json::encodeToString)
|
||||
.replace("\"", "\\\"")
|
||||
|
||||
val requestBody = """{
|
||||
|"path":"search/serie?page=$page",
|
||||
|"headers":{"Content-type":"application/json"},
|
||||
|"method":"POST","body":"$searchBody"
|
||||
|}
|
||||
""".trimMargin().toRequestBody(JSON_MEDIA_TYPE)
|
||||
|
||||
return POST(apiUrl, headers, requestBody)
|
||||
return postPath("search/serie/${query.trim()}?page=$page")
|
||||
}
|
||||
|
||||
val advSearchBody = buildString {
|
||||
|
@ -9,7 +9,7 @@ class FlixScansGenerator : ThemeSourceGenerator {
|
||||
|
||||
override val themeClass = "FlixScans"
|
||||
|
||||
override val baseVersionCode: Int = 4
|
||||
override val baseVersionCode: Int = 5
|
||||
|
||||
override val sources = listOf(
|
||||
SingleLang("Flix Scans", "https://flixscans.org", "en", className = "FlixScansNet", pkgName = "flixscans"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user