Initial commit
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
BIN
multisrc/overrides/madara/paragonscans/res/web_hi_res_512.png
Normal file
BIN
multisrc/overrides/madara/paragonscans/res/web_hi_res_512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
40
multisrc/overrides/madara/paragonscans/src/ParagonScans.kt
Normal file
40
multisrc/overrides/madara/paragonscans/src/ParagonScans.kt
Normal file
@@ -0,0 +1,40 @@
|
||||
package eu.kanade.tachiyomi.extension.en.paragonscans
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Calendar
|
||||
import java.util.Locale
|
||||
|
||||
class ParagonScans : Madara(
|
||||
"Paragon Scans",
|
||||
"https://paragonscans.com",
|
||||
"en",
|
||||
dateFormat = SimpleDateFormat("MM/dd/yyyy", Locale.ROOT),
|
||||
) {
|
||||
override val useNewChapterEndpoint = true
|
||||
override val mangaSubString = "mangax"
|
||||
|
||||
override fun searchPage(page: Int): String = if (page == 1) "" else "page/$page/"
|
||||
|
||||
override fun parseChapterDate(date: String?): Long {
|
||||
date ?: return 0
|
||||
|
||||
val splitDate = date.split(' ')
|
||||
if (splitDate.size < 2) {
|
||||
return super.parseChapterDate(date)
|
||||
}
|
||||
|
||||
val (amountStr, unit) = splitDate
|
||||
val amount = amountStr.toIntOrNull()
|
||||
?: return super.parseChapterDate(date)
|
||||
|
||||
val cal = Calendar.getInstance()
|
||||
return when (unit) {
|
||||
"s" -> cal.apply { add(Calendar.SECOND, -amount) }.timeInMillis // not observed
|
||||
"m" -> cal.apply { add(Calendar.MINUTE, -amount) }.timeInMillis // not observed
|
||||
"h" -> cal.apply { add(Calendar.HOUR_OF_DAY, -amount) }.timeInMillis
|
||||
"d" -> cal.apply { add(Calendar.DAY_OF_MONTH, -amount) }.timeInMillis
|
||||
else -> super.parseChapterDate(date)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user