From e6ea530532523ed033fd232fcea2da8f17b973f7 Mon Sep 17 00:00:00 2001 From: Jays2Kings Date: Fri, 27 Aug 2021 13:32:51 -0400 Subject: [PATCH] Update kitsu to not show "null" for empty descriptions --- .../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 d5ec925414..3d9a3d1a14 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 @@ -25,7 +25,7 @@ class KitsuSearchManga(obj: JsonObject) { // posterImage is sometimes a jsonNull object instead null } - private val synopsis = obj["synopsis"]!!.jsonPrimitive.content + private val synopsis = obj["synopsis"]?.jsonPrimitive?.contentOrNull private var startDate = obj["startDate"]?.jsonPrimitive?.contentOrNull?.let { val outputDf = SimpleDateFormat("yyyy-MM-dd", Locale.US) outputDf.format(Date(it.toLong() * 1000)) @@ -38,7 +38,7 @@ class KitsuSearchManga(obj: JsonObject) { title = canonicalTitle total_chapters = chapterCount ?: 0 cover_url = original ?: "" - summary = synopsis + summary = synopsis ?: "" tracking_url = KitsuApi.mangaUrl(media_id) publishing_status = if (endDate == null) { "Publishing"