[RU]Desu fix hide not last empty chapter (#14327)

This commit is contained in:
Eshlender 2022-11-24 21:00:52 +05:00 committed by GitHub
parent 394a2be3b0
commit b4016560fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = 'Desu'
pkgNameSuffix = 'ru.desu'
extClass = '.Desu'
extVersionCode = 19
extVersionCode = 20
}
apply from: "$rootDir/common.gradle"

View File

@ -203,7 +203,7 @@ class Desu : HttpSource() {
val cid = obj["id"]!!.jsonPrimitive.int
val objChapter = obj["chapters"]!!
return objChapter.jsonObject["list"]!!.jsonArray.map {
return objChapter.jsonObject["list"]!!.jsonArray.filterNot { it.jsonObject["vol"]!!.jsonPrimitive.floatOrNull!! == objChapter.jsonObject["last"]!!.jsonObject["vol"]!!.jsonPrimitive.float && it.jsonObject["ch"]!!.jsonPrimitive.floatOrNull!! > objChapter.jsonObject["last"]!!.jsonObject["ch"]!!.jsonPrimitive.float }.map {
val chapterObj = it.jsonObject
val ch = chapterObj["ch"]!!.jsonPrimitive.content
val vol = chapterObj["vol"]!!.jsonPrimitive.content
@ -217,7 +217,7 @@ class Desu : HttpSource() {
chapter_number = ch.toFloatOrNull() ?: -1f
date_upload = chapterObj["date"]!!.jsonPrimitive.long * 1000L
}
}.filter { it.chapter_number <= objChapter.jsonObject["last"]!!.jsonObject["ch"]!!.jsonPrimitive.float }
}
}
override fun chapterListRequest(manga: SManga): Request = titleDetailsRequest(manga)