From 27d26f2814168fd9baba95a57b8257286d3c3f2d Mon Sep 17 00:00:00 2001 From: ObserverOfTime Date: Sat, 1 Jan 2022 14:19:47 +0200 Subject: [PATCH] Comick.fun: fix chapter numbers (#10293) --- src/all/comickfun/build.gradle | 2 +- .../tachiyomi/extension/all/comickfun/ComickFunSerialization.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/all/comickfun/build.gradle b/src/all/comickfun/build.gradle index 65de02de3..2cab48f3a 100644 --- a/src/all/comickfun/build.gradle +++ b/src/all/comickfun/build.gradle @@ -6,7 +6,7 @@ ext { extName = 'Comick.fun' pkgNameSuffix = 'all.comickfun' extClass = '.ComickFunFactory' - extVersionCode = 8 + extVersionCode = 9 isNsfw = true } diff --git a/src/all/comickfun/src/eu/kanade/tachiyomi/extension/all/comickfun/ComickFunSerialization.kt b/src/all/comickfun/src/eu/kanade/tachiyomi/extension/all/comickfun/ComickFunSerialization.kt index 00dadb5e4..8d35393ab 100644 --- a/src/all/comickfun/src/eu/kanade/tachiyomi/extension/all/comickfun/ComickFunSerialization.kt +++ b/src/all/comickfun/src/eu/kanade/tachiyomi/extension/all/comickfun/ComickFunSerialization.kt @@ -161,7 +161,7 @@ class SChapterDeserializer : KSerializer { "vol" -> vol = decodeNullableSerializableElement(descriptor, index, serializer()) "chap" -> { chap = decodeNullableSerializableElement(descriptor, index, serializer()) - chapter_number = chap?.toFloat() ?: -1f + chapter_number = chap?.substringBefore('-')?.toFloatOrNull() ?: -1f } "hid" -> hid = decodeStringElement(descriptor, index) "iso639_1" -> iso639_1 = decodeStringElement(descriptor, index)