JapScan: use older version of JsonParser method for stable compatibility (fixes #2481)

This commit is contained in:
arkon 2020-03-29 12:23:59 -04:00
parent 13d98a48b8
commit efb9215f73
2 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: Japscan' appName = 'Tachiyomi: Japscan'
pkgNameSuffix = 'fr.japscan' pkgNameSuffix = 'fr.japscan'
extClass = '.Japscan' extClass = '.Japscan'
extVersionCode = 19 extVersionCode = 20
libVersion = '1.2' libVersion = '1.2'
} }
@ -13,6 +13,6 @@ apply from: "$rootDir/common.gradle"
dependencies { dependencies {
implementation 'org.apache.commons:commons-lang3:3.8.1' implementation 'org.apache.commons:commons-lang3:3.8.1'
compileOnly 'com.google.code.gson:gson:2.8.6' compileOnly 'com.google.code.gson:gson:2.8.2'
compileOnly 'com.github.salomonbrys.kotson:kotson:2.5.0' compileOnly 'com.github.salomonbrys.kotson:kotson:2.5.0'
} }

View File

@ -183,7 +183,7 @@ class Japscan : ParsedHttpSource() {
override fun searchMangaParse(response: Response): MangasPage { override fun searchMangaParse(response: Response): MangasPage {
if ("live-search" in response.request().url().toString()) { if ("live-search" in response.request().url().toString()) {
val body = response.body()!!.string() val body = response.body()!!.string()
val json = JsonParser.parseString(body).asJsonArray val json = JsonParser().parse(body).asJsonArray
val mangas = json.map { jsonElement -> val mangas = json.map { jsonElement ->
searchMangaFromJson(jsonElement) searchMangaFromJson(jsonElement)
} }