From b4016560fa6667754f80e049c661130826185c8b Mon Sep 17 00:00:00 2001 From: Eshlender <35057681+e-shl@users.noreply.github.com> Date: Thu, 24 Nov 2022 21:00:52 +0500 Subject: [PATCH] [RU]Desu fix hide not last empty chapter (#14327) --- src/ru/desu/build.gradle | 2 +- src/ru/desu/src/eu/kanade/tachiyomi/extension/ru/desu/Desu.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ru/desu/build.gradle b/src/ru/desu/build.gradle index 2a6a725ad..129e093d8 100644 --- a/src/ru/desu/build.gradle +++ b/src/ru/desu/build.gradle @@ -6,7 +6,7 @@ ext { extName = 'Desu' pkgNameSuffix = 'ru.desu' extClass = '.Desu' - extVersionCode = 19 + extVersionCode = 20 } apply from: "$rootDir/common.gradle" diff --git a/src/ru/desu/src/eu/kanade/tachiyomi/extension/ru/desu/Desu.kt b/src/ru/desu/src/eu/kanade/tachiyomi/extension/ru/desu/Desu.kt index 7586146e8..f115ed6b3 100644 --- a/src/ru/desu/src/eu/kanade/tachiyomi/extension/ru/desu/Desu.kt +++ b/src/ru/desu/src/eu/kanade/tachiyomi/extension/ru/desu/Desu.kt @@ -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)