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 12d6de5b4..e524ef705 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 @@ -88,8 +88,10 @@ class KitsuApi(private val client: OkHttpClient, interceptor: KitsuInterceptor) fun findLibManga(track: Track, userId: String): Observable { return rest.findLibManga(track.remote_id, userId) .map { json -> - val data = json["data"].array - if (data.size() > 0) { + val data = json["data"].array.filter { + it["relationships"]["media"]["data"]["type"].string == "manga" + } + if (data.isNotEmpty()) { KitsuLibManga(data[0].obj, json["included"].array[0].obj).toTrack() } else { null