MeituaTop: Fix chapter not found for Suwayomi users (#6191)
Add parseDate
This commit is contained in:
parent
a420b0e1f6
commit
e1f897f6c8
|
@ -1,7 +1,7 @@
|
||||||
ext {
|
ext {
|
||||||
extName = 'Meitua.top'
|
extName = 'Meitua.top'
|
||||||
extClass = '.MeituaTop'
|
extClass = '.MeituaTop'
|
||||||
extVersionCode = 7
|
extVersionCode = 8
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -76,12 +76,16 @@ class MeituaTop : HttpSource() {
|
||||||
val chapter = SChapter.create().apply {
|
val chapter = SChapter.create().apply {
|
||||||
url = manga.url
|
url = manga.url
|
||||||
name = "Gallery"
|
name = "Gallery"
|
||||||
date_upload = dateFormat.parse(manga.description!!)!!.time
|
date_upload = parseDate(manga.description!!)
|
||||||
chapter_number = -2f
|
chapter_number = -2f
|
||||||
}
|
}
|
||||||
return Observable.just(listOf(chapter))
|
return Observable.just(listOf(chapter))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun parseDate(date: String): Long = runCatching {
|
||||||
|
dateFormat.parse(date)?.time
|
||||||
|
}.getOrNull() ?: 0L
|
||||||
|
|
||||||
override fun chapterListParse(response: Response) = throw UnsupportedOperationException()
|
override fun chapterListParse(response: Response) = throw UnsupportedOperationException()
|
||||||
|
|
||||||
override fun pageListParse(response: Response): List<Page> {
|
override fun pageListParse(response: Response): List<Page> {
|
||||||
|
|
Loading…
Reference in New Issue