[RU]ComX fix naming chapters (#15933)

This commit is contained in:
Eshlender 2023-04-02 16:45:47 +05:00 committed by GitHub
parent a07b750d33
commit 724848090a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = 'Com-X' extName = 'Com-X'
pkgNameSuffix = 'ru.comx' pkgNameSuffix = 'ru.comx'
extClass = '.ComX' extClass = '.ComX'
extVersionCode = 23 extVersionCode = 24
} }
apply from: "$rootDir/common.gradle" apply from: "$rootDir/common.gradle"

View File

@ -305,6 +305,9 @@ class ComX : ParsedHttpSource() {
if (chapter.name.isEmpty()) { if (chapter.name.isEmpty()) {
chapter.name = it.jsonObject["title"]!!.jsonPrimitive.content chapter.name = it.jsonObject["title"]!!.jsonPrimitive.content
} }
if (chapter.name == "[перевода не существует]") {
chapter.name = it.jsonObject["title"]!!.jsonPrimitive.content + " " + "[перевода не существует]"
}
chapter.date_upload = simpleDateFormat.parse(it.jsonObject["date"]!!.jsonPrimitive.content)?.time ?: 0L chapter.date_upload = simpleDateFormat.parse(it.jsonObject["date"]!!.jsonPrimitive.content)?.time ?: 0L
chapter.chapter_number = it.jsonObject["posi"]!!.jsonPrimitive.float chapter.chapter_number = it.jsonObject["posi"]!!.jsonPrimitive.float
chapter.setUrlWithoutDomain("/readcomix/" + data["news_id"] + "/" + it.jsonObject["id"]!!.jsonPrimitive.content + ".html") chapter.setUrlWithoutDomain("/readcomix/" + data["news_id"] + "/" + it.jsonObject["id"]!!.jsonPrimitive.content + ".html")