Mangahub: add alternative name to desc (#8529)

This commit is contained in:
Riztard Lanthorn 2021-08-12 18:34:16 +07:00 committed by GitHub
parent 1ff375ebf6
commit a3b5dda817
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'Mangahub' extName = 'Mangahub'
pkgNameSuffix = 'en.mangahub' pkgNameSuffix = 'en.mangahub'
extClass = '.Mangahub' extClass = '.Mangahub'
extVersionCode = 7 extVersionCode = 8
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -88,6 +88,16 @@ class Mangahub : ParsedHttpSource() {
} }
} }
// add alternative name to manga description
document.select("h1 small").firstOrNull()?.ownText()?.let {
if (it.isEmpty().not()) {
manga.description += when {
manga.description!!.isEmpty() -> "Alternative Name: $it"
else -> "\n\nAlternative Name: $it"
}
}
}
return manga return manga
} }