MangAdventure: support more series statuses (#16017)

This commit is contained in:
ObserverOfTime 2023-04-10 21:29:25 +03:00 committed by GitHub
parent 6706a6cf2b
commit 9f68bdf964
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 6 deletions

View File

@ -155,10 +155,12 @@ abstract class MangAdventure(
status = if (series.licensed == true) { status = if (series.licensed == true) {
SManga.LICENSED SManga.LICENSED
} else { } else {
when (series.completed) { when (series.status) {
true -> SManga.COMPLETED "completed" -> SManga.COMPLETED
false -> SManga.ONGOING "ongoing" -> SManga.ONGOING
null -> SManga.UNKNOWN "hiatus" -> SManga.ON_HIATUS
"canceled" -> SManga.CANCELLED
else -> SManga.UNKNOWN
} }
} }
} }

View File

@ -53,7 +53,7 @@ internal data class Series(
val title: String, val title: String,
val cover: String, val cover: String,
val description: String? = null, val description: String? = null,
val completed: Boolean? = null, val status: String? = null,
val licensed: Boolean? = null, val licensed: Boolean? = null,
val aliases: List<String>? = null, val aliases: List<String>? = null,
val authors: List<String>? = null, val authors: List<String>? = null,

View File

@ -9,7 +9,7 @@ class MangAdventureGenerator : ThemeSourceGenerator {
override val themeClass = "MangAdventure" override val themeClass = "MangAdventure"
override val baseVersionCode = 11 override val baseVersionCode = 12
override val sources = listOf( override val sources = listOf(
SingleLang("Arc-Relight", "https://arc-relight.com", "en", className = "ArcRelight"), SingleLang("Arc-Relight", "https://arc-relight.com", "en", className = "ArcRelight"),