From 77d986f2134ef3d9c74e9b74c9469b0fce3715e3 Mon Sep 17 00:00:00 2001 From: len Date: Sat, 7 Jan 2017 00:54:57 +0100 Subject: [PATCH] Kitsu: also filter included by manga --- .../main/java/eu/kanade/tachiyomi/data/track/kitsu/KitsuApi.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/KitsuApi.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/KitsuApi.kt index e524ef705..65d7c2d88 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/KitsuApi.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/KitsuApi.kt @@ -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 }