Exclude novels from Kitsu results
This commit is contained in:
parent
d09eca7833
commit
ea6fed6ecf
@ -79,7 +79,9 @@ class KitsuApi(private val client: OkHttpClient, interceptor: KitsuInterceptor)
|
||||
return rest.search(query)
|
||||
.map { json ->
|
||||
val data = json["data"].array
|
||||
data.map { KitsuManga(it.obj).toTrack() }
|
||||
data.map { KitsuManga(it.obj) }
|
||||
.filter { it.type != "novel" }
|
||||
.map { it.toTrack() }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,7 @@ open class KitsuManga(obj: JsonObject) {
|
||||
val id by obj.byInt
|
||||
val canonicalTitle by obj["attributes"].byString
|
||||
val chapterCount = obj["attributes"].obj.get("chapterCount").nullInt
|
||||
val type = obj["attributes"]["mangaType"].string
|
||||
|
||||
@CallSuper
|
||||
open fun toTrack() = Track.create(TrackManager.KITSU).apply {
|
||||
|
Loading…
Reference in New Issue
Block a user