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 {
extName = "HentaiNexus"
extClass = ".HentaiNexus"
extVersionCode = 7
extVersionCode = 8
isNsfw = true
}

View File

@ -146,9 +146,9 @@ class HentaiNexus : ParsedHttpSource() {
val encoded = script.substringAfter("initReader(\"").substringBefore("\",")
val data = HentaiNexusUtils.decryptData(encoded)
return json.parseToJsonElement(data).jsonArray.mapIndexed { i, it ->
Page(i, imageUrl = it.jsonObject["image"]!!.jsonPrimitive.content)
}
return json.parseToJsonElement(data).jsonArray
.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()