fix manga plus entries
(cherry picked from commit 1b5624a601144b4ccdebf379d53a2b4c5f90c2f6) # Conflicts: # app/src/main/java/exh/md/handlers/ApiChapterParser.kt
This commit is contained in:
parent
85853b159d
commit
3a5182103a
@ -6,6 +6,7 @@ import exh.md.utils.MdUtil
|
||||
import kotlinx.serialization.decodeFromString
|
||||
import kotlinx.serialization.json.Json
|
||||
import kotlinx.serialization.json.JsonObject
|
||||
import kotlinx.serialization.json.jsonObject
|
||||
import kotlinx.serialization.json.jsonPrimitive
|
||||
import okhttp3.Response
|
||||
|
||||
@ -31,7 +32,7 @@ class ApiChapterParser {
|
||||
fun externalParse(response: Response): String {
|
||||
val jsonData = response.body!!.string()
|
||||
val json = Json.decodeFromString<JsonObject>(jsonData)
|
||||
val external = json["external"]!!.jsonPrimitive.content
|
||||
val external = json["data"]!!.jsonObject["pages"]!!.jsonPrimitive.content
|
||||
return external.substringAfterLast("/")
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user