Fix Kouhai Scanlations (#9352)

This commit is contained in:
ObserverOfTime 2021-10-04 14:29:18 +03:00 committed by GitHub
parent b623778c6d
commit 6212a7bba0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 6 deletions

View File

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

View File

@ -9,9 +9,9 @@ data class KouhaiSeries(
val cover: String,
val synopsis: String,
val status: String,
val artists: List<String>,
val authors: List<String>,
val alternative_titles: List<String>,
val artists: List<String>? = null,
val authors: List<String>? = null,
val genres: List<String>? = null,
val themes: List<String>? = null,
val demographics: List<String>? = null,

View File

@ -66,9 +66,13 @@ class KouhaiWork : HttpSource() {
override fun fetchMangaDetails(manga: SManga) =
client.newCall(chapterListRequest(manga)).asObservableSuccess().map {
val series = it.data<KouhaiSeries>()
manga.description = series.synopsis
manga.author = series.authors.joinToString()
manga.artist = series.artists.joinToString()
manga.description = buildString {
append(series.synopsis)
append("\n\nAlternative Names:\n")
series.alternative_titles.joinTo(this, "\n")
}
manga.author = series.authors?.joinToString()
manga.artist = series.artists?.joinToString()
manga.genre = series.genres.orEmpty()
.plus(series.themes.orEmpty())
.plus(series.demographics.orEmpty())