From 6450c99b960cb5bd1ad97cedeb248341a73131cb Mon Sep 17 00:00:00 2001 From: Davide <49226282+pizidavi@users.noreply.github.com> Date: Sat, 30 Jul 2022 14:38:15 +0200 Subject: [PATCH] Madara: Added Hiatus and Canceled support (#12785) * Madara: Added Hiatus support * Added Canceled support --- .../eu/kanade/tachiyomi/multisrc/madara/Madara.kt | 12 ++++++++++-- .../tachiyomi/multisrc/madara/MadaraGenerator.kt | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/Madara.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/Madara.kt index d146b7924..7c5ed67c5 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/Madara.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/Madara.kt @@ -615,6 +615,14 @@ abstract class Madara( "Devam ediyor", "In Corso", "In Arrivo", "مستمرة", "مستمر", "En Curso" ) + protected val hiatusStatusList: Array = arrayOf( + "On Hold" + ) + + protected val canceledStatusList: Array = 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 } } diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt index afe004977..fe6c10aad 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt @@ -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),