Cubari: fix genre parsing (#14712)
This commit is contained in:
parent
5d2a17a109
commit
3a4982defd
|
@ -6,7 +6,7 @@ ext {
|
||||||
extName = 'Cubari'
|
extName = 'Cubari'
|
||||||
pkgNameSuffix = "all.cubari"
|
pkgNameSuffix = "all.cubari"
|
||||||
extClass = '.CubariFactory'
|
extClass = '.CubariFactory'
|
||||||
extVersionCode = 15
|
extVersionCode = 16
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
|
|
@ -352,7 +352,13 @@ open class Cubari(override val lang: String) : HttpSource() {
|
||||||
|
|
||||||
val descriptionFull = jsonObj["description"]?.jsonPrimitive?.content
|
val descriptionFull = jsonObj["description"]?.jsonPrimitive?.content
|
||||||
description = descriptionFull?.substringBefore("Tags: ") ?: DESCRIPTION_FALLBACK
|
description = descriptionFull?.substringBefore("Tags: ") ?: DESCRIPTION_FALLBACK
|
||||||
genre = if (descriptionFull!!.contains("Tags: ")) descriptionFull?.substringAfter("Tags: ") else ""
|
genre = descriptionFull?.let {
|
||||||
|
if (it.contains("Tags: ")) {
|
||||||
|
it.substringAfter("Tags: ")
|
||||||
|
} else {
|
||||||
|
""
|
||||||
|
}
|
||||||
|
} ?: ""
|
||||||
|
|
||||||
url = mangaReference?.url ?: jsonObj["url"]!!.jsonPrimitive.content
|
url = mangaReference?.url ?: jsonObj["url"]!!.jsonPrimitive.content
|
||||||
thumbnail_url = jsonObj["coverUrl"]?.jsonPrimitive?.content
|
thumbnail_url = jsonObj["coverUrl"]?.jsonPrimitive?.content
|
||||||
|
|
Loading…
Reference in New Issue