HN: Show only entire images (#768)

HN - Show only entire images
This commit is contained in:
Fermín Cirella 2024-01-28 23:42:22 -03:00 committed by GitHub
parent 32c4a69174
commit 558ce75c34
2 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
ext { ext {
extName = "HentaiNexus" extName = "HentaiNexus"
extClass = ".HentaiNexus" extClass = ".HentaiNexus"
extVersionCode = 7 extVersionCode = 8
isNsfw = true isNsfw = true
} }

View File

@ -146,9 +146,9 @@ class HentaiNexus : ParsedHttpSource() {
val encoded = script.substringAfter("initReader(\"").substringBefore("\",") val encoded = script.substringAfter("initReader(\"").substringBefore("\",")
val data = HentaiNexusUtils.decryptData(encoded) val data = HentaiNexusUtils.decryptData(encoded)
return json.parseToJsonElement(data).jsonArray.mapIndexed { i, it -> return json.parseToJsonElement(data).jsonArray
Page(i, imageUrl = it.jsonObject["image"]!!.jsonPrimitive.content) .filter { it.jsonObject["type"]!!.jsonPrimitive.content == "image" }
} .mapIndexed { i, it -> Page(i, imageUrl = it.jsonObject["image"]!!.jsonPrimitive.content) }
} }
override fun imageUrlParse(document: Document) = throw UnsupportedOperationException() override fun imageUrlParse(document: Document) = throw UnsupportedOperationException()