ComicCake: Fixed date format for older Android API (#1077)

ComiCake: Fixed date format for older Android API
This commit is contained in:
Vesnyx 2019-05-03 21:40:45 +00:00 committed by Eugene
parent 05edfd22fe
commit 36abd9b3d0
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: ComiCake'
pkgNameSuffix = "all.comicake"
extClass = '.ComiCakeFactory'
extVersionCode = 2
extVersionCode = 3
libVersion = '1.2'
}

View File

@ -122,7 +122,7 @@ open class ComiCake(override val name: String, override val baseUrl: String, ove
private fun parseChapterJson(obj: JSONObject) = SChapter.create().apply {
name = obj.getString("title") // title will always have content, vs. name that's an optional field
chapter_number = (obj.getInt("chapter") + (obj.getInt("subchapter") / 10.0)).toFloat()
date_upload = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX").parse(obj.getString("published_at")).time
date_upload = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZZZ").parse(obj.getString("published_at")).time
// TODO scanlator field by adding team to expandable in CC (low priority given the use case of CC)
url = obj.getString("manifest")
}