comick: fix date (#16628)
This commit is contained in:
parent
abd91a3156
commit
c6487255fb
|
@ -6,7 +6,7 @@ ext {
|
|||
extName = 'Comick'
|
||||
pkgNameSuffix = 'all.comickfun'
|
||||
extClass = '.ComickFunFactory'
|
||||
extVersionCode = 26
|
||||
extVersionCode = 27
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ import uy.kohesive.injekt.Injekt
|
|||
import uy.kohesive.injekt.api.get
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
import java.util.TimeZone
|
||||
|
||||
abstract class ComickFun(
|
||||
override val lang: String,
|
||||
|
@ -314,7 +315,9 @@ abstract class ComickFun(
|
|||
companion object {
|
||||
const val SLUG_SEARCH_PREFIX = "id:"
|
||||
val dateFormat by lazy {
|
||||
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.ENGLISH)
|
||||
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.ENGLISH).apply {
|
||||
timeZone = TimeZone.getTimeZone("UTC")
|
||||
}
|
||||
}
|
||||
val markdownLinksRegex = "\\[([^]]+)\\]\\(([^)]+)\\)".toRegex()
|
||||
val markdownItalicBoldRegex = "\\*+\\s*([^\\*]*)\\s*\\*+".toRegex()
|
||||
|
|
|
@ -100,7 +100,7 @@ data class Chapter(
|
|||
val hid: String,
|
||||
val lang: String,
|
||||
val title: String = "",
|
||||
val updated_at: String = "",
|
||||
val created_at: String = "",
|
||||
val chap: String = "",
|
||||
val vol: String = "",
|
||||
val group_name: List<String> = emptyList(),
|
||||
|
@ -108,7 +108,7 @@ data class Chapter(
|
|||
fun toSChapter(mangaUrl: String) = SChapter.create().apply {
|
||||
url = "$mangaUrl/$hid-chapter-$chap-$lang"
|
||||
name = beautifyChapterName(vol, chap, title)
|
||||
date_upload = updated_at.parseDate()
|
||||
date_upload = created_at.parseDate()
|
||||
scanlator = group_name.joinToString().takeUnless { it.isBlank() } ?: "Unknown"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue