mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-28 09:15:12 +03:00
Exclude novels from Kitsu results
This commit is contained in:
parent
d09eca7833
commit
ea6fed6ecf
2 changed files with 4 additions and 1 deletions
|
@ -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 a new issue