MangaSee - small fix for broken pages (#3663)
This commit is contained in:
parent
f14439bcad
commit
f4fa994be3
|
@ -5,7 +5,7 @@ ext {
|
|||
extName = 'Mangasee'
|
||||
pkgNameSuffix = 'en.mangasee'
|
||||
extClass = '.Mangasee'
|
||||
extVersionCode = 8
|
||||
extVersionCode = 9
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
|
|
@ -223,8 +223,8 @@ class Mangasee : HttpSource() {
|
|||
|
||||
private val chapterImageRegex = Regex("""^0+""")
|
||||
|
||||
private fun chapterImage(e: String): String {
|
||||
val a = e.substring(1, e.length - 1).replace(chapterImageRegex, "")
|
||||
private fun chapterImage(e: String, cleanString: Boolean = false): String {
|
||||
val a = e.substring(1, e.length - 1).let { if (cleanString) it.replace(chapterImageRegex, "") else it }
|
||||
val b = e.substring(e.length - 1).toInt()
|
||||
return if (b == 0) {
|
||||
a
|
||||
|
@ -240,7 +240,7 @@ class Mangasee : HttpSource() {
|
|||
return gson.fromJson<JsonArray>(vmChapters).map { json ->
|
||||
val indexChapter = json["Chapter"].string
|
||||
SChapter.create().apply {
|
||||
name = json["ChapterName"].nullString.let { if (it.isNullOrEmpty()) "${json["Type"].string} ${chapterImage(indexChapter)}" else it }
|
||||
name = json["ChapterName"].nullString.let { if (it.isNullOrEmpty()) "${json["Type"].string} ${chapterImage(indexChapter, true)}" else it }
|
||||
url = "/read-online/" + response.request().url().toString().substringAfter("/manga/") + chapterURLEncode(indexChapter)
|
||||
date_upload = try {
|
||||
dateFormat.parse(json["Date"].string.substringBefore(" "))?.time ?: 0
|
||||
|
|
Loading…
Reference in New Issue