diff --git a/src/ja/comicnewtype/build.gradle b/src/ja/comicnewtype/build.gradle index ebec894ab..00f5b736b 100644 --- a/src/ja/comicnewtype/build.gradle +++ b/src/ja/comicnewtype/build.gradle @@ -6,7 +6,7 @@ ext { extName = 'Comic Newtype' pkgNameSuffix = 'ja.comicnewtype' extClass = '.ComicNewtype' - extVersionCode = 1 + extVersionCode = 2 } apply from: "$rootDir/common.gradle" diff --git a/src/ja/comicnewtype/src/eu/kanade/tachiyomi/extension/ja/comicnewtype/ComicNewtype.kt b/src/ja/comicnewtype/src/eu/kanade/tachiyomi/extension/ja/comicnewtype/ComicNewtype.kt index d8039f2ac..ea2257dd5 100644 --- a/src/ja/comicnewtype/src/eu/kanade/tachiyomi/extension/ja/comicnewtype/ComicNewtype.kt +++ b/src/ja/comicnewtype/src/eu/kanade/tachiyomi/extension/ja/comicnewtype/ComicNewtype.kt @@ -8,8 +8,9 @@ import eu.kanade.tachiyomi.source.model.SChapter import eu.kanade.tachiyomi.source.model.SManga import eu.kanade.tachiyomi.source.online.HttpSource import eu.kanade.tachiyomi.util.asJsoup -import kotlinx.serialization.decodeFromString import kotlinx.serialization.json.Json +import kotlinx.serialization.json.JsonArray +import kotlinx.serialization.json.jsonArray import kotlinx.serialization.json.jsonObject import kotlinx.serialization.json.jsonPrimitive import okhttp3.HttpUrl.Companion.toHttpUrl @@ -115,7 +116,11 @@ class ComicNewtype : HttpSource() { override fun pageListRequest(chapter: SChapter) = GET(baseUrl + chapter.url + "json/", headers) override fun pageListParse(response: Response): List = - Json.decodeFromString>(response.body!!.string()).mapIndexed { index, path -> + Json.parseToJsonElement(response.body!!.string()).jsonArray.mapIndexed { index, jsonElement -> + val path = when (jsonElement) { + is JsonArray -> jsonElement[0] + else -> jsonElement + }.jsonPrimitive.content val newPath = path.removeSuffix("/h1200q75nc/") Page(index, imageUrl = baseUrl + newPath) }