Kouhai Work: fix missing alt titles (#10709)

This commit is contained in:
ObserverOfTime 2022-02-05 19:44:36 +02:00 committed by GitHub
parent a60274e18b
commit 93593a29f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = 'Kouhai Work'
pkgNameSuffix = 'en.kouhaiwork'
extClass = '.KouhaiWork'
extVersionCode = 5
extVersionCode = 6
}
apply from: "$rootDir/common.gradle"

View File

@ -34,7 +34,7 @@ data class KouhaiSeries(
data class KouhaiSeriesDetails(
val synopsis: String,
val status: String,
val alternative_titles: List<String>,
val alternative_titles: List<String>? = null,
val artists: List<KouhaiTag>? = null,
val authors: List<KouhaiTag>? = null,
val genres: List<KouhaiTag>? = 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) }
}
}