* Picacomic: Fix json decoding error of non-ASCII chars (#19434) Caused by #19400 * bump version code to 4 * replace decodeToString with toString
This commit is contained in:
parent
66019f2511
commit
7e4d35b066
|
@ -6,7 +6,7 @@ ext {
|
|||
extName = 'Picacomic'
|
||||
pkgNameSuffix = 'zh.picacomic'
|
||||
extClass = '.Picacomic'
|
||||
extVersionCode = 3
|
||||
extVersionCode = 4
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ import org.json.JSONObject
|
|||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
import java.net.URLEncoder
|
||||
import java.nio.charset.Charset
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
import java.util.Locale
|
||||
|
@ -100,7 +101,7 @@ class Picacomic : HttpSource(), ConfigurableSource {
|
|||
)
|
||||
}
|
||||
|
||||
val payload = parts[1]?.let { JSONObject(String(Base64.decode(it, Base64.DEFAULT))) }
|
||||
val payload = parts[1]?.let { JSONObject(Base64.decode(it, Base64.DEFAULT).toString(Charsets.UTF_8)) }
|
||||
|
||||
val exp = payload?.getLong("exp")?.let {
|
||||
Date(it * 1000)
|
||||
|
|
Loading…
Reference in New Issue