mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 23:41:50 +01:00
Filter out novels from MAL search results
This commit is contained in:
parent
e7ef974a39
commit
2fd5a9e883
@ -73,11 +73,14 @@ class MyAnimeListApi(private val client: OkHttpClient, interceptor: MyAnimeListI
|
|||||||
authClient.newCall(GET(url.toString())).await().use {
|
authClient.newCall(GET(url.toString())).await().use {
|
||||||
val responseBody = it.body?.string().orEmpty()
|
val responseBody = it.body?.string().orEmpty()
|
||||||
val response = json.decodeFromString<JsonObject>(responseBody)
|
val response = json.decodeFromString<JsonObject>(responseBody)
|
||||||
response["data"]!!.jsonArray.map {
|
response["data"]!!.jsonArray
|
||||||
val node = it.jsonObject["node"]!!.jsonObject
|
.map { data -> data.jsonObject["node"]!!.jsonObject }
|
||||||
val id = node["id"]!!.jsonPrimitive.int
|
.map { node ->
|
||||||
async { getMangaDetails(id) }
|
val id = node["id"]!!.jsonPrimitive.int
|
||||||
}.awaitAll()
|
async { getMangaDetails(id) }
|
||||||
|
}
|
||||||
|
.awaitAll()
|
||||||
|
.filter { trackSearch -> trackSearch.publishing_type != "novel" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user