MangaSee, MangaLife - more accurate date parsing (#3783)
This commit is contained in:
parent
8ef7624233
commit
ff77a2495c
|
@ -5,7 +5,7 @@ ext {
|
|||
extName = 'MangaLife'
|
||||
pkgNameSuffix = 'en.mangalife'
|
||||
extClass = '.MangaLife'
|
||||
extVersionCode = 7
|
||||
extVersionCode = 8
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
|
|
@ -205,7 +205,7 @@ class MangaLife : HttpSource() {
|
|||
|
||||
// Chapters - Mind special cases like decimal chapters (e.g. One Punch Man) and manga with seasons (e.g. The Gamer)
|
||||
|
||||
private val dateFormat = SimpleDateFormat("yyyy-MM-dd", Locale.getDefault())
|
||||
private val dateFormat = SimpleDateFormat("yyyy-MM-dd HH:mm:SS Z", Locale.getDefault())
|
||||
|
||||
private fun chapterURLEncode(e: String): String {
|
||||
var index = ""
|
||||
|
@ -238,7 +238,7 @@ class MangaLife : HttpSource() {
|
|||
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 ?: 0
|
||||
json["Date"].nullString?.let { dateFormat.parse("$it +0600")?.time } ?: 0
|
||||
} catch (_: Exception) {
|
||||
0L
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ ext {
|
|||
extName = 'Mangasee'
|
||||
pkgNameSuffix = 'en.mangasee'
|
||||
extClass = '.Mangasee'
|
||||
extVersionCode = 10
|
||||
extVersionCode = 11
|
||||
libVersion = '1.2'
|
||||
}
|
||||
|
||||
|
|
|
@ -208,7 +208,7 @@ class Mangasee : HttpSource() {
|
|||
|
||||
// Chapters - Mind special cases like decimal chapters (e.g. One Punch Man) and manga with seasons (e.g. The Gamer)
|
||||
|
||||
private val dateFormat = SimpleDateFormat("yyyy-MM-dd", Locale.getDefault())
|
||||
private val dateFormat = SimpleDateFormat("yyyy-MM-dd HH:mm:SS Z", Locale.getDefault())
|
||||
|
||||
private fun chapterURLEncode(e: String): String {
|
||||
var index = ""
|
||||
|
@ -243,7 +243,7 @@ class Mangasee : HttpSource() {
|
|||
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
|
||||
json["Date"].nullString?.let { dateFormat.parse("$it +0600")?.time } ?: 0
|
||||
} catch (_: Exception) {
|
||||
0L
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue