MangaLife - fix chapters (#3112)
This commit is contained in:
parent
8ad5c5e47c
commit
50204b6354
|
@ -5,7 +5,7 @@ ext {
|
|||
appName = 'Tachiyomi: MangaLife'
|
||||
pkgNameSuffix = 'en.mangalife'
|
||||
extClass = '.MangaLife'
|
||||
extVersionCode = 4
|
||||
extVersionCode = 5
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package eu.kanade.tachiyomi.extension.en.mangalife
|
|||
|
||||
import com.github.salomonbrys.kotson.fromJson
|
||||
import com.github.salomonbrys.kotson.get
|
||||
import com.github.salomonbrys.kotson.nullString
|
||||
import com.github.salomonbrys.kotson.string
|
||||
import com.google.gson.GsonBuilder
|
||||
import com.google.gson.JsonArray
|
||||
|
@ -233,7 +234,7 @@ class MangaLife : HttpSource() {
|
|||
return gson.fromJson<JsonArray>(vmChapters).map { json ->
|
||||
val indexChapter = json["Chapter"].string
|
||||
SChapter.create().apply {
|
||||
name = json["ChapterName"].string.let { if (it.isNotEmpty()) it else "${json["Type"].string} ${chapterImage(indexChapter)}" }
|
||||
name = json["ChapterName"].nullString.let { if (it.isNullOrEmpty()) "${json["Type"].string} ${chapterImage(indexChapter)}" else it }
|
||||
url = "/read-online/" + response.request().url().toString().substringAfter("/manga/") + chapterURLEncode(indexChapter)
|
||||
date_upload = try {
|
||||
dateFormat.parse(json["Date"].string.substringBefore(" ")).time
|
||||
|
|
Loading…
Reference in New Issue