diff --git a/src/all/cubari/build.gradle b/src/all/cubari/build.gradle index 335aefa9f..d9c6d33b8 100644 --- a/src/all/cubari/build.gradle +++ b/src/all/cubari/build.gradle @@ -6,7 +6,7 @@ ext { extName = 'Cubari' pkgNameSuffix = "all.cubari" extClass = '.CubariFactory' - extVersionCode = 17 + extVersionCode = 18 } apply from: "$rootDir/common.gradle" diff --git a/src/all/cubari/src/eu/kanade/tachiyomi/extension/all/cubari/Cubari.kt b/src/all/cubari/src/eu/kanade/tachiyomi/extension/all/cubari/Cubari.kt index 0b9d51d06..5c1564dbc 100644 --- a/src/all/cubari/src/eu/kanade/tachiyomi/extension/all/cubari/Cubari.kt +++ b/src/all/cubari/src/eu/kanade/tachiyomi/extension/all/cubari/Cubari.kt @@ -183,7 +183,10 @@ open class Cubari(override val lang: String) : HttpSource() { val groupMap = groups.entries.associateBy({ it.value.jsonPrimitive.content.ifEmpty { "default" } }, { it.key }) val chapterScanlator = chapter.scanlator ?: "default" // workaround for "" as group causing NullPointerException (#13772) - val chapters = jsonObj["chapters"]!!.jsonObject + // prevent NullPointerException when chapters.key is 084 and chapter.chapter_number is 84 + val chapters = jsonObj["chapters"]!!.jsonObject.mapKeys { + it.key.replace(Regex("^0+(?!$)"), "") + } val pages = if (chapters[chapter.chapter_number.toString()] != null) { chapters[chapter.chapter_number.toString()]!!