From a26c4ce824406ece07d4f947e6db0a598c2afa35 Mon Sep 17 00:00:00 2001 From: Alessandro Jean <14254807+alessandrojean@users.noreply.github.com> Date: Tue, 18 Oct 2022 16:21:47 -0300 Subject: [PATCH] Fix the closed error in Spanish YugenMangas. (#13910) --- .../java/eu/kanade/tachiyomi/multisrc/heancms/HeanCms.kt | 6 +++--- .../kanade/tachiyomi/multisrc/heancms/HeanCmsGenerator.kt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/heancms/HeanCms.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/heancms/HeanCms.kt index 092beba65..5f83ca76b 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/heancms/HeanCms.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/heancms/HeanCms.kt @@ -78,7 +78,7 @@ abstract class HeanCms( return MangasPage(mangaList, result.meta?.hasNextPage ?: false) } - val mangaList = response.parseAs>() + val mangaList = json.parseAs>() .map { it.toSManga(apiUrl, coverPath) } fetchAllTitles() @@ -153,7 +153,7 @@ abstract class HeanCms( return MangasPage(mangaList, result.meta?.hasNextPage ?: false) } - var mangaList = response.parseAs>() + var mangaList = json.parseAs>() .map { it.toSManga(apiUrl, coverPath) } if (query.isNotBlank()) { @@ -324,7 +324,7 @@ abstract class HeanCms( } private inline fun Response.parseAs(): T = use { - json.decodeFromString(it.body?.string().orEmpty()) + it.body?.string().orEmpty().parseAs() } private inline fun String.parseAs(): T = json.decodeFromString(this) diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/heancms/HeanCmsGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/heancms/HeanCmsGenerator.kt index d5f4c7436..6cc2ed430 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/heancms/HeanCmsGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/heancms/HeanCmsGenerator.kt @@ -9,7 +9,7 @@ class HeanCmsGenerator : ThemeSourceGenerator { override val themeClass = "HeanCms" - override val baseVersionCode: Int = 2 + override val baseVersionCode: Int = 3 override val sources = listOf( SingleLang("Reaper Scans", "https://reaperscans.net", "pt-BR", overrideVersionCode = 35),