瀏覽代碼

Kitsu: also filter included by manga

len 8 年之前
父節點
當前提交
77d986f213
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/KitsuApi.kt

+ 2 - 1
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
                     }