From c82de4147f998cb6dea48bfd03adaee79381cee1 Mon Sep 17 00:00:00 2001 From: Alessandro Jean Date: Mon, 5 Apr 2021 00:34:27 -0300 Subject: [PATCH] Fix 'JsonNull' error in Tsuki. (#6427) --- src/pt/tsukimangas/build.gradle | 2 +- .../tachiyomi/extension/pt/tsukimangas/TsukiMangas.kt | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pt/tsukimangas/build.gradle b/src/pt/tsukimangas/build.gradle index c23975904..104ceae20 100644 --- a/src/pt/tsukimangas/build.gradle +++ b/src/pt/tsukimangas/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'Tsuki Mangás' pkgNameSuffix = 'pt.tsukimangas' extClass = '.TsukiMangas' - extVersionCode = 11 + extVersionCode = 12 libVersion = '1.2' } diff --git a/src/pt/tsukimangas/src/eu/kanade/tachiyomi/extension/pt/tsukimangas/TsukiMangas.kt b/src/pt/tsukimangas/src/eu/kanade/tachiyomi/extension/pt/tsukimangas/TsukiMangas.kt index e1487e7c2..cca8e0c65 100644 --- a/src/pt/tsukimangas/src/eu/kanade/tachiyomi/extension/pt/tsukimangas/TsukiMangas.kt +++ b/src/pt/tsukimangas/src/eu/kanade/tachiyomi/extension/pt/tsukimangas/TsukiMangas.kt @@ -173,10 +173,10 @@ class TsukiMangas : HttpSource() { return SManga.create().apply { title = result["title"].string thumbnail_url = baseUrl + "/imgs/" + result["poster"].string.substringBefore("?") - description = result["synopsis"].string - status = result["status"].string.toStatus() - author = result["author"].string - artist = result["artist"].string + description = result["synopsis"].nullString.orEmpty() + status = result["status"].nullString.orEmpty().toStatus() + author = result["author"].nullString.orEmpty() + artist = result["artist"].nullString.orEmpty() genre = result["genres"].array.joinToString { it.obj["genre"].string } } }