diff --git a/src/zh/dmzj/build.gradle b/src/zh/dmzj/build.gradle index 7502fdfd9..6da52e906 100644 --- a/src/zh/dmzj/build.gradle +++ b/src/zh/dmzj/build.gradle @@ -6,7 +6,7 @@ ext { extName = 'Dmzj' pkgNameSuffix = 'zh.dmzj' extClass = '.Dmzj' - extVersionCode = 25 + extVersionCode = 26 } dependencies { diff --git a/src/zh/dmzj/src/eu/kanade/tachiyomi/extension/zh/dmzj/Dmzj.kt b/src/zh/dmzj/src/eu/kanade/tachiyomi/extension/zh/dmzj/Dmzj.kt index e45c71f08..8861e851f 100644 --- a/src/zh/dmzj/src/eu/kanade/tachiyomi/extension/zh/dmzj/Dmzj.kt +++ b/src/zh/dmzj/src/eu/kanade/tachiyomi/extension/zh/dmzj/Dmzj.kt @@ -406,7 +406,7 @@ class Dmzj : ConfigurableSource, HttpSource() { val ret = ArrayList(arr.length()) for (i in 0 until arr.length()) { // Seems image urls from webpage api and api.m.dmzj.com may be URL encoded multiple times - val url = URLDecoder.decode(URLDecoder.decode(arr.getString(i), "UTF-8"), "UTF-8") + val url = Uri.decode(Uri.decode(arr.getString(i))) .replace("http:", "https:") .replace("dmzj1.com", "dmzj.com") ret.add(Page(i, "", url)) @@ -416,7 +416,7 @@ class Dmzj : ConfigurableSource, HttpSource() { private fun String.encoded(): String { return this.chunked(1) - .joinToString("") { if (it in setOf("%", " ", "+", "#")) URLEncoder.encode(it, "UTF-8") else it } + .joinToString("") { if (it in setOf("%", " ", "+", "#")) Uri.encode(it) else it } .let { if (it.endsWith(".jp")) "${it}g" else it } }