Fix minutes that format was not matched with rawLH format. (#1056)

This commit is contained in:
DitFranXX 2019-04-24 07:31:46 +09:00 committed by Eugene
parent 207c1fc526
commit 7754674400
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: LHTranslation'
pkgNameSuffix = 'en.lhtranslation'
extClass = '.LHTranslation'
extVersionCode = 2
extVersionCode = 3
libVersion = '1.2'
}

View File

@ -120,7 +120,7 @@ class LHTranslation : ParsedHttpSource() {
private fun parseChapterDate(date: String): Long {
val value = date.split(' ')[0].toInt()
return when {
"minute(s) ago" in date -> Calendar.getInstance().apply {
"min(s) ago" in date -> Calendar.getInstance().apply {
add(Calendar.MINUTE, value * -1)
set(Calendar.SECOND, 0)
set(Calendar.MILLISECOND, 0)