diff --git a/src/all/mangafire/build.gradle b/src/all/mangafire/build.gradle index 73b413c2e..68375cac3 100644 --- a/src/all/mangafire/build.gradle +++ b/src/all/mangafire/build.gradle @@ -3,7 +3,7 @@ ext { extClass = '.MangaFireFactory' themePkg = 'mangareader' baseUrl = 'https://mangafire.to' - overrideVersionCode = 4 + overrideVersionCode = 5 isNsfw = true } diff --git a/src/all/mangafire/src/eu/kanade/tachiyomi/extension/all/mangafire/MangaFire.kt b/src/all/mangafire/src/eu/kanade/tachiyomi/extension/all/mangafire/MangaFire.kt index ada9b6598..bd3ca013c 100644 --- a/src/all/mangafire/src/eu/kanade/tachiyomi/extension/all/mangafire/MangaFire.kt +++ b/src/all/mangafire/src/eu/kanade/tachiyomi/extension/all/mangafire/MangaFire.kt @@ -138,13 +138,13 @@ open class MangaFire( override fun parseChapterElements(response: Response, isVolume: Boolean): List { val result = json.decodeFromString>(response.body.string()).result val document = Jsoup.parse(result) - - val elements = document.select("ul li") + val selector = if (isVolume) "div.unit" else "ul li" + val elements = document.select(selector) if (elements.size > 0) { val linkToFirstChapter = elements[0].selectFirst(Evaluator.Tag("a"))!!.attr("href") val mangaId = linkToFirstChapter.toString().substringAfter('.').substringBefore('/') - - val request = GET("$baseUrl/ajax/read/$mangaId/chapter/$langCode", headers) + val type = if (isVolume) volumeType else chapterType + val request = GET("$baseUrl/ajax/read/$mangaId/$type/$langCode", headers) val response = client.newCall(request).execute() val res = json.decodeFromString>(response.body.string()).result.html val chapterInfoDocument = Jsoup.parse(res)