From 93593a29f1f769d7ec5838493c20b4f7ccdb2155 Mon Sep 17 00:00:00 2001 From: ObserverOfTime Date: Sat, 5 Feb 2022 19:44:36 +0200 Subject: [PATCH] Kouhai Work: fix missing alt titles (#10709) --- src/en/kouhaiwork/build.gradle | 2 +- .../tachiyomi/extension/en/kouhaiwork/KouhaiAPI.kt | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/en/kouhaiwork/build.gradle b/src/en/kouhaiwork/build.gradle index 195ab5698..3b192b620 100644 --- a/src/en/kouhaiwork/build.gradle +++ b/src/en/kouhaiwork/build.gradle @@ -6,7 +6,7 @@ ext { extName = 'Kouhai Work' pkgNameSuffix = 'en.kouhaiwork' extClass = '.KouhaiWork' - extVersionCode = 5 + extVersionCode = 6 } apply from: "$rootDir/common.gradle" diff --git a/src/en/kouhaiwork/src/eu/kanade/tachiyomi/extension/en/kouhaiwork/KouhaiAPI.kt b/src/en/kouhaiwork/src/eu/kanade/tachiyomi/extension/en/kouhaiwork/KouhaiAPI.kt index aa6cab39c..368d0e554 100644 --- a/src/en/kouhaiwork/src/eu/kanade/tachiyomi/extension/en/kouhaiwork/KouhaiAPI.kt +++ b/src/en/kouhaiwork/src/eu/kanade/tachiyomi/extension/en/kouhaiwork/KouhaiAPI.kt @@ -34,7 +34,7 @@ data class KouhaiSeries( data class KouhaiSeriesDetails( val synopsis: String, val status: String, - val alternative_titles: List, + val alternative_titles: List? = null, val artists: List? = null, val authors: List? = null, val genres: List? = null, @@ -48,8 +48,9 @@ data class KouhaiSeriesDetails( override fun toString() = buildString { append(synopsis) - append("\n\nAlternative Names:\n") - alternative_titles.joinTo(this, "\n") + alternative_titles?.joinTo( + this, "\n", "\n\nAlternative Names:\n" + ) } } @@ -69,10 +70,12 @@ data class KouhaiChapter( } override fun toString() = buildString { - volume?.let { append("[Vol. $it] ") } + volume?.let { + append("[Vol. ").append(it).append("] ") + } append("Chapter ") append(decimalFormat.format(number)) - name?.let { append(" - $it") } + name?.let { append(" - ").append(it) } } }