mangadex no chapter fix (#366)
This commit is contained in:
parent
2c39f21d70
commit
f6143e226b
|
@ -5,8 +5,8 @@ ext {
|
||||||
appName = 'Tachiyomi: MangaDex'
|
appName = 'Tachiyomi: MangaDex'
|
||||||
pkgNameSuffix = "all.mangadex"
|
pkgNameSuffix = "all.mangadex"
|
||||||
extClass = '.MangadexFactory'
|
extClass = '.MangadexFactory'
|
||||||
extVersionCode = 28
|
extVersionCode = 29
|
||||||
extVersionSuffix = 28
|
extVersionSuffix = 29
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -222,7 +222,6 @@ open class Mangadex(override val lang: String, private val internalLang: String,
|
||||||
|
|
||||||
override fun mangaDetailsParse(response: Response): SManga {
|
override fun mangaDetailsParse(response: Response): SManga {
|
||||||
val manga = SManga.create()
|
val manga = SManga.create()
|
||||||
|
|
||||||
var jsonData = response.body()!!.string()
|
var jsonData = response.body()!!.string()
|
||||||
val json = JsonParser().parse(jsonData).asJsonObject
|
val json = JsonParser().parse(jsonData).asJsonObject
|
||||||
val mangaJson = json.getAsJsonObject("manga")
|
val mangaJson = json.getAsJsonObject("manga")
|
||||||
|
@ -274,7 +273,7 @@ open class Mangadex(override val lang: String, private val internalLang: String,
|
||||||
|
|
||||||
private fun isMangaCompleted(finalChapterNumber: String, chapterJson: JsonObject): Boolean {
|
private fun isMangaCompleted(finalChapterNumber: String, chapterJson: JsonObject): Boolean {
|
||||||
|
|
||||||
val count = chapterJson.toMap().values.filter { it ->
|
val count = chapterJson?.toMap().values.filter { it ->
|
||||||
val chapterElement = it.asJsonObject
|
val chapterElement = it.asJsonObject
|
||||||
return chapterElement.get("lang_code").string == internalLang && doesFinalChapterExist(finalChapterNumber, it)
|
return chapterElement.get("lang_code").string == internalLang && doesFinalChapterExist(finalChapterNumber, it)
|
||||||
}?.count()
|
}?.count()
|
||||||
|
|
Loading…
Reference in New Issue