Madara: Added Hiatus and Canceled support (#12785)

* Madara: Added Hiatus support

* Added Canceled support
This commit is contained in:
Davide 2022-07-30 14:38:15 +02:00 committed by GitHub
parent 95fe3e9526
commit 6450c99b96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View File

@ -615,6 +615,14 @@ abstract class Madara(
"Devam ediyor", "In Corso", "In Arrivo", "مستمرة", "مستمر", "En Curso"
)
protected val hiatusStatusList: Array<String> = arrayOf(
"On Hold"
)
protected val canceledStatusList: Array<String> = arrayOf(
"Canceled"
)
override fun mangaDetailsParse(document: Document): SManga {
val manga = SManga.create()
with(document) {
@ -645,10 +653,10 @@ abstract class Madara(
}
select(mangaDetailsSelectorStatus).last()?.let {
manga.status = when (it.text()) {
// I don't know what's the corresponding for COMPLETED and LICENSED
// There's no support for "Canceled" or "On Hold"
in completedStatusList -> SManga.COMPLETED
in ongoingStatusList -> SManga.ONGOING
in hiatusStatusList -> SManga.ON_HIATUS
in canceledStatusList -> SManga.CANCELLED
else -> SManga.UNKNOWN
}
}

View File

@ -10,7 +10,7 @@ class MadaraGenerator : ThemeSourceGenerator {
override val themeClass = "Madara"
override val baseVersionCode: Int = 23
override val baseVersionCode: Int = 24
override val sources = listOf(
MultiLang("Leviatan Scans", "https://leviatanscans.com", listOf("en", "es"), className = "LeviatanScansFactory", overrideVersionCode = 10),