Fix Gson conversion mistake (fixes #10118)
I wonder if it'll only be 1.
This commit is contained in:
parent
b02fef76c5
commit
3406d5bf04
@ -128,7 +128,7 @@ abstract class Luscious(
|
|||||||
languageIds.toMutableMap().apply {
|
languageIds.toMutableMap().apply {
|
||||||
put(
|
put(
|
||||||
"value",
|
"value",
|
||||||
JsonPrimitive ("+$lusLang${languageIds["value"]!!.jsonPrimitive.content}")
|
JsonPrimitive("+$lusLang${languageIds["value"]!!.jsonPrimitive.content}")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@ -210,7 +210,7 @@ abstract class Luscious(
|
|||||||
|
|
||||||
private fun buildAlbumInfoRequestInput(id: String): JsonObject {
|
private fun buildAlbumInfoRequestInput(id: String): JsonObject {
|
||||||
return buildJsonObject {
|
return buildJsonObject {
|
||||||
put("id", id)
|
put("id", id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -268,7 +268,7 @@ abstract class Luscious(
|
|||||||
val chapter = SChapter.create()
|
val chapter = SChapter.create()
|
||||||
val url = when (getResolutionPref()) {
|
val url = when (getResolutionPref()) {
|
||||||
"-1" -> it.jsonObject["url_to_original"]!!.jsonPrimitive.content
|
"-1" -> it.jsonObject["url_to_original"]!!.jsonPrimitive.content
|
||||||
else -> it.jsonObject["thumbnails"]!!.jsonObject[getResolutionPref()?.toInt()!!]!!.jsonObject["url"]!!.jsonPrimitive.content
|
else -> it.jsonObject["thumbnails"]!!.jsonArray[getResolutionPref()?.toInt()!!].jsonObject["url"]!!.jsonPrimitive.content
|
||||||
}
|
}
|
||||||
when {
|
when {
|
||||||
url.startsWith("//") -> chapter.url = "https:$url"
|
url.startsWith("//") -> chapter.url = "https:$url"
|
||||||
@ -300,10 +300,12 @@ abstract class Luscious(
|
|||||||
return buildJsonObject {
|
return buildJsonObject {
|
||||||
putJsonObject("input") {
|
putJsonObject("input") {
|
||||||
putJsonArray("filters") {
|
putJsonArray("filters") {
|
||||||
add(buildJsonObject {
|
add(
|
||||||
put("name", "album_id")
|
buildJsonObject {
|
||||||
put("value", id)
|
put("name", "album_id")
|
||||||
})
|
put("value", id)
|
||||||
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
put("display", getSortPref())
|
put("display", getSortPref())
|
||||||
put("page", page)
|
put("page", page)
|
||||||
@ -338,7 +340,7 @@ abstract class Luscious(
|
|||||||
val index = it.jsonObject["position"]!!.jsonPrimitive.int
|
val index = it.jsonObject["position"]!!.jsonPrimitive.int
|
||||||
val url = when (getResolutionPref()) {
|
val url = when (getResolutionPref()) {
|
||||||
"-1" -> it.jsonObject["url_to_original"]!!.jsonPrimitive.content
|
"-1" -> it.jsonObject["url_to_original"]!!.jsonPrimitive.content
|
||||||
else -> it.jsonObject["thumbnails"]!!.jsonObject[getResolutionPref()?.toInt()!!]!!.jsonObject["url"]!!.jsonPrimitive.content
|
else -> it.jsonObject["thumbnails"]!!.jsonArray[getResolutionPref()?.toInt()!!].jsonObject["url"]!!.jsonPrimitive.content
|
||||||
}
|
}
|
||||||
when {
|
when {
|
||||||
url.startsWith("//") -> pages.add(Page(index, "https:$url", "https:$url"))
|
url.startsWith("//") -> pages.add(Page(index, "https:$url", "https:$url"))
|
||||||
@ -387,7 +389,7 @@ abstract class Luscious(
|
|||||||
}
|
}
|
||||||
when (getResolutionPref()) {
|
when (getResolutionPref()) {
|
||||||
"-1" -> data["items"]!!.jsonArray[page.index % 50].jsonObject["url_to_original"]!!.jsonPrimitive.content
|
"-1" -> data["items"]!!.jsonArray[page.index % 50].jsonObject["url_to_original"]!!.jsonPrimitive.content
|
||||||
else -> data["items"]!!.jsonArray[page.index % 50].jsonObject["thumbnails"]!!.jsonObject[getResolutionPref()?.toInt()!!]!!.jsonObject["url"]!!.jsonPrimitive.content
|
else -> data["items"]!!.jsonArray[page.index % 50].jsonObject["thumbnails"]!!.jsonArray[getResolutionPref()?.toInt()!!].jsonObject["url"]!!.jsonPrimitive.content
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ class LusciousGenerator : ThemeSourceGenerator {
|
|||||||
|
|
||||||
override val themeClass = "Luscious"
|
override val themeClass = "Luscious"
|
||||||
|
|
||||||
override val baseVersionCode: Int = 13
|
override val baseVersionCode: Int = 14
|
||||||
|
|
||||||
override val sources = listOf(
|
override val sources = listOf(
|
||||||
MultiLang("Luscious", "https://www.luscious.net", listOf("en", "ja", "es", "it", "de", "fr", "zh", "ko", "other", "pt-BR", "th", "all"), isNsfw = true, className = "LusciousFactory", overrideVersionCode = 2),
|
MultiLang("Luscious", "https://www.luscious.net", listOf("en", "ja", "es", "it", "de", "fr", "zh", "ko", "other", "pt-BR", "th", "all"), isNsfw = true, className = "LusciousFactory", overrideVersionCode = 2),
|
||||||
|
@ -511,7 +511,7 @@ abstract class Madara(
|
|||||||
// Added "title" alternative
|
// Added "title" alternative
|
||||||
chapter.date_upload = select("img").firstOrNull()?.attr("alt")?.let { parseRelativeDate(it) }
|
chapter.date_upload = select("img").firstOrNull()?.attr("alt")?.let { parseRelativeDate(it) }
|
||||||
?: select("span a").firstOrNull()?.attr("title")?.let { parseRelativeDate(it) }
|
?: select("span a").firstOrNull()?.attr("title")?.let { parseRelativeDate(it) }
|
||||||
?: parseChapterDate(select("span.chapter-release-date i").firstOrNull()?.text())
|
?: parseChapterDate(select("span.chapter-release-date i").firstOrNull()?.text())
|
||||||
}
|
}
|
||||||
|
|
||||||
return chapter
|
return chapter
|
||||||
|
Loading…
x
Reference in New Issue
Block a user