Comic Fx: fix chapter pages (#877)
* Comic Fx: fix chapter pages * Update src/id/comicfx/src/eu/kanade/tachiyomi/extension/id/comicfx/ComicFx.kt Co-authored-by: beerpsi <92439990+beerpiss@users.noreply.github.com> * Update src/id/comicfx/src/eu/kanade/tachiyomi/extension/id/comicfx/ComicFx.kt * Update ComicFx.kt * Update ComicFx.kt --------- Co-authored-by: beerpsi <92439990+beerpiss@users.noreply.github.com>
This commit is contained in:
parent
891f335741
commit
bbeb1622ca
|
@ -1,7 +1,7 @@
|
||||||
ext {
|
ext {
|
||||||
extName = 'Comic Fx'
|
extName = 'Comic Fx'
|
||||||
extClass = '.ComicFx'
|
extClass = '.ComicFx'
|
||||||
extVersionCode = 5
|
extVersionCode = 6
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
apply from: "$rootDir/common.gradle"
|
||||||
|
|
|
@ -205,18 +205,13 @@ class ComicFx : ParsedHttpSource() {
|
||||||
override fun imageUrlParse(document: Document) = ""
|
override fun imageUrlParse(document: Document) = ""
|
||||||
|
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
val pages = mutableListOf<Page>()
|
val pages = document.toString().substringAfter("var pages = ").substringBefore(";")
|
||||||
|
|
||||||
document.select("#all img").mapIndexed { i, element ->
|
return json.parseToJsonElement(pages).jsonArray.mapIndexed { i, it ->
|
||||||
val image = element.attr("abs:src")
|
Page(i, imageUrl = it.jsonObject["page_image"]!!.jsonPrimitive.content)
|
||||||
if (image != "") {
|
|
||||||
pages.add(Page(i, "", image))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return pages
|
|
||||||
}
|
|
||||||
|
|
||||||
// filters
|
// filters
|
||||||
override fun getFilterList() = FilterList(
|
override fun getFilterList() = FilterList(
|
||||||
SortFilter(sortList),
|
SortFilter(sortList),
|
||||||
|
|
Loading…
Reference in New Issue