mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 03:01:49 +01:00
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)
|
return rest.search(query)
|
||||||
.map { json ->
|
.map { json ->
|
||||||
val data = json["data"].array
|
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 id by obj.byInt
|
||||||
val canonicalTitle by obj["attributes"].byString
|
val canonicalTitle by obj["attributes"].byString
|
||||||
val chapterCount = obj["attributes"].obj.get("chapterCount").nullInt
|
val chapterCount = obj["attributes"].obj.get("chapterCount").nullInt
|
||||||
|
val type = obj["attributes"]["mangaType"].string
|
||||||
|
|
||||||
@CallSuper
|
@CallSuper
|
||||||
open fun toTrack() = Track.create(TrackManager.KITSU).apply {
|
open fun toTrack() = Track.create(TrackManager.KITSU).apply {
|
||||||
|
Loading…
Reference in New Issue
Block a user