MangaTaro: handle days in relative date parsing (#11325)

This commit is contained in:
AwkwardPeak7 2025-10-29 19:07:34 +05:00 committed by Draff
parent a2d9686eeb
commit cd528cde6a
Signed by: Draff
GPG Key ID: E8A89F3211677653
2 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,7 @@
ext {
extName = 'MangaTaro'
extClass = '.MangaTaro'
extVersionCode = 3
extVersionCode = 4
isNsfw = false
}

View File

@ -292,6 +292,7 @@ class MangaTaro : HttpSource() {
when (unit) {
"h" -> calendar.add(Calendar.HOUR, -amount.toInt())
"d" -> calendar.add(Calendar.DAY_OF_YEAR, -amount.toInt())
"w" -> calendar.add(Calendar.WEEK_OF_YEAR, -amount.toInt())
"mo" -> calendar.add(Calendar.MONTH, -amount.toInt())
"y" -> calendar.add(Calendar.YEAR, -amount.toInt())
@ -300,7 +301,7 @@ class MangaTaro : HttpSource() {
return calendar.timeInMillis
}
private val relativeDateRegex = Regex("""(\d+)(h|w|mo|y) ago""")
private val relativeDateRegex = Regex("""(\d+)(h|d|w|mo|y) ago""")
override fun imageUrlParse(response: Response): String {
throw UnsupportedOperationException()