Added new date format for readmanga/mintmanga (#724)
Added new date format for readmanga/mintmanga
This commit is contained in:
parent
75625d6931
commit
0a917249f8
|
@ -5,7 +5,7 @@ ext {
|
||||||
appName = 'Tachiyomi: Mintmanga'
|
appName = 'Tachiyomi: Mintmanga'
|
||||||
pkgNameSuffix = 'ru.mintmanga'
|
pkgNameSuffix = 'ru.mintmanga'
|
||||||
extClass = '.Mintmanga'
|
extClass = '.Mintmanga'
|
||||||
extVersionCode = 8
|
extVersionCode = 9
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
|
import java.text.ParseException
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import java.util.regex.Pattern
|
import java.util.regex.Pattern
|
||||||
|
|
||||||
|
@ -114,7 +115,11 @@ class Mintmanga : ParsedHttpSource() {
|
||||||
chapter.name = urlText
|
chapter.name = urlText
|
||||||
}
|
}
|
||||||
chapter.date_upload = element.select("td.hidden-xxs").last()?.text()?.let {
|
chapter.date_upload = element.select("td.hidden-xxs").last()?.text()?.let {
|
||||||
|
try {
|
||||||
SimpleDateFormat("dd/MM/yy", Locale.US).parse(it).time
|
SimpleDateFormat("dd/MM/yy", Locale.US).parse(it).time
|
||||||
|
} catch (e: ParseException) {
|
||||||
|
SimpleDateFormat("dd.MM.yy", Locale.US).parse(it).time
|
||||||
|
}
|
||||||
} ?: 0
|
} ?: 0
|
||||||
return chapter
|
return chapter
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ ext {
|
||||||
appName = 'Tachiyomi: Readmanga'
|
appName = 'Tachiyomi: Readmanga'
|
||||||
pkgNameSuffix = 'ru.readmanga'
|
pkgNameSuffix = 'ru.readmanga'
|
||||||
extClass = '.Readmanga'
|
extClass = '.Readmanga'
|
||||||
extVersionCode = 8
|
extVersionCode = 9
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
|
import java.text.ParseException
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import java.util.regex.Pattern
|
import java.util.regex.Pattern
|
||||||
|
|
||||||
|
@ -114,7 +115,11 @@ class Readmanga : ParsedHttpSource() {
|
||||||
chapter.name = urlText
|
chapter.name = urlText
|
||||||
}
|
}
|
||||||
chapter.date_upload = element.select("td.hidden-xxs").last()?.text()?.let {
|
chapter.date_upload = element.select("td.hidden-xxs").last()?.text()?.let {
|
||||||
|
try {
|
||||||
SimpleDateFormat("dd/MM/yy", Locale.US).parse(it).time
|
SimpleDateFormat("dd/MM/yy", Locale.US).parse(it).time
|
||||||
|
} catch (e: ParseException) {
|
||||||
|
SimpleDateFormat("dd.MM.yy", Locale.US).parse(it).time
|
||||||
|
}
|
||||||
} ?: 0
|
} ?: 0
|
||||||
return chapter
|
return chapter
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue