mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-21 20:47:03 -05:00
Kitsu: also filter included by manga
This commit is contained in:
parent
13bcefe5cd
commit
77d986f213
1 changed files with 2 additions and 1 deletions
|
@ -92,7 +92,8 @@ class KitsuApi(private val client: OkHttpClient, interceptor: KitsuInterceptor)
|
|||
it["relationships"]["media"]["data"]["type"].string == "manga"
|
||||
}
|
||||
if (data.isNotEmpty()) {
|
||||
KitsuLibManga(data[0].obj, json["included"].array[0].obj).toTrack()
|
||||
val media = json["included"].array.first { it["type"].string == "manga" }.obj
|
||||
KitsuLibManga(data[0].obj, media).toTrack()
|
||||
} else {
|
||||
null
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue