[RU]Desu filter empty chapters (#11769)
* [RU]Desu filter empty chapters * back old if
This commit is contained in:
parent
e8bd48d9c6
commit
6d282d3c80
@ -6,7 +6,7 @@ ext {
|
|||||||
extName = 'Desu'
|
extName = 'Desu'
|
||||||
pkgNameSuffix = 'ru.desu'
|
pkgNameSuffix = 'ru.desu'
|
||||||
extClass = '.Desu'
|
extClass = '.Desu'
|
||||||
extVersionCode = 15
|
extVersionCode = 16
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
@ -93,7 +93,7 @@ class Desu : HttpSource() {
|
|||||||
|
|
||||||
var altName = ""
|
var altName = ""
|
||||||
|
|
||||||
if (obj["synonyms"]!!.jsonPrimitive.contentOrNull != null) {
|
if (obj["synonyms"]?.jsonPrimitive?.content.orEmpty().isNotEmpty() && obj["synonyms"]!!.jsonPrimitive.contentOrNull != null) {
|
||||||
altName = "Альтернативные названия:\n" +
|
altName = "Альтернативные названия:\n" +
|
||||||
obj["synonyms"]!!.jsonPrimitive.content
|
obj["synonyms"]!!.jsonPrimitive.content
|
||||||
.replace("|", " / ") +
|
.replace("|", " / ") +
|
||||||
@ -200,8 +200,8 @@ class Desu : HttpSource() {
|
|||||||
.jsonObject
|
.jsonObject
|
||||||
|
|
||||||
val cid = obj["id"]!!.jsonPrimitive.int
|
val cid = obj["id"]!!.jsonPrimitive.int
|
||||||
|
val objChapter = obj["chapters"]!!
|
||||||
return obj["chapters"]!!.jsonObject["list"]!!.jsonArray.map {
|
return objChapter.jsonObject["list"]!!.jsonArray.map {
|
||||||
val chapterObj = it.jsonObject
|
val chapterObj = it.jsonObject
|
||||||
val ch = chapterObj["ch"]!!.jsonPrimitive.float
|
val ch = chapterObj["ch"]!!.jsonPrimitive.float
|
||||||
val fullNumStr = "${chapterObj["vol"]!!.jsonPrimitive.int}. Глава " + DecimalFormat("#,###.##").format(ch).replace(",", ".")
|
val fullNumStr = "${chapterObj["vol"]!!.jsonPrimitive.int}. Глава " + DecimalFormat("#,###.##").format(ch).replace(",", ".")
|
||||||
@ -213,7 +213,7 @@ class Desu : HttpSource() {
|
|||||||
chapter_number = ch
|
chapter_number = ch
|
||||||
date_upload = chapterObj["date"]!!.jsonPrimitive.long * 1000L
|
date_upload = chapterObj["date"]!!.jsonPrimitive.long * 1000L
|
||||||
}
|
}
|
||||||
}
|
}.filter { it.chapter_number <= objChapter.jsonObject["last"]!!.jsonObject["ch"]!!.jsonPrimitive.float }
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun chapterListRequest(manga: SManga): Request {
|
override fun chapterListRequest(manga: SManga): Request {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user