MeituaTop: Fix chapter not found for Suwayomi users (#6191)

Add parseDate
This commit is contained in:
are-are-are 2024-11-21 21:07:35 +07:00 committed by Draff
parent a420b0e1f6
commit e1f897f6c8
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 6 additions and 2 deletions

View File

@ -1,7 +1,7 @@
ext {
extName = 'Meitua.top'
extClass = '.MeituaTop'
extVersionCode = 7
extVersionCode = 8
isNsfw = true
}

View File

@ -76,12 +76,16 @@ class MeituaTop : HttpSource() {
val chapter = SChapter.create().apply {
url = manga.url
name = "Gallery"
date_upload = dateFormat.parse(manga.description!!)!!.time
date_upload = parseDate(manga.description!!)
chapter_number = -2f
}
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 pageListParse(response: Response): List<Page> {