Fix manhuaren thumbnail url (#585)

Fix manhuaren thumbnail url
This commit is contained in:
Gordon 2018-10-24 19:29:38 +08:00 committed by Carlos
parent c3330537fb
commit d8962e9285
2 changed files with 15 additions and 2 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: Manhuaren'
pkgNameSuffix = 'zh.manhuaren'
extClass = '.Manhuaren'
extVersionCode = 1
extVersionCode = 2
libVersion = '1.2'
}

View File

@ -186,7 +186,20 @@ class Manhuaren : HttpSource() {
val res = response.body()!!.string()
val obj = JSONObject(res).getJSONObject("response")
title = obj.getString("mangaName")
thumbnail_url = obj.getString("mangaCoverimageUrl")
thumbnail_url = ""
obj.optString("mangaCoverimageUrl").let {
if (it != "") { thumbnail_url = it }
}
if (thumbnail_url == "") {
obj.optString("mangaPicimageUrl").let {
if (it != "") { thumbnail_url = it }
}
}
if (thumbnail_url == "") {
obj.optString("shareIcon").let {
if (it != "") { thumbnail_url = it }
}
}
var arr = obj.getJSONArray("mangaAuthors")
var tmparr = ArrayList<String>(arr.length())