From 8b67255186eb61bc2739a433956d843d769dfc0b Mon Sep 17 00:00:00 2001 From: Carlos Date: Sat, 27 Oct 2018 13:34:05 -0400 Subject: [PATCH] kitsu search fix (#1681) --- .../java/eu/kanade/tachiyomi/data/track/kitsu/KitsuModels.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/KitsuModels.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/KitsuModels.kt index bdc82cd82..ca0de7d3d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/KitsuModels.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/kitsu/KitsuModels.kt @@ -14,7 +14,7 @@ class KitsuSearchManga(obj: JsonObject) { private val canonicalTitle by obj.byString private val chapterCount = obj.get("chapterCount").nullInt val subType = obj.get("subtype").nullString - val original by obj["posterImage"].byString + val original = obj.get("posterImage").nullObj?.get("original")?.asString private val synopsis by obj.byString private var startDate = obj.get("startDate").nullString?.let { val outputDf = SimpleDateFormat("yyyy-MM-dd", Locale.US) @@ -28,7 +28,7 @@ class KitsuSearchManga(obj: JsonObject) { media_id = this@KitsuSearchManga.id title = canonicalTitle total_chapters = chapterCount ?: 0 - cover_url = original + cover_url = original ?: "" summary = synopsis tracking_url = KitsuApi.mangaUrl(media_id) if (endDate == null) {