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) {
SManga.LICENSED
} else {
when (series.completed) {
true -> SManga.COMPLETED
false -> SManga.ONGOING
null -> SManga.UNKNOWN
when (series.status) {
"completed" -> SManga.COMPLETED
"ongoing" -> SManga.ONGOING
"hiatus" -> SManga.ON_HIATUS
"canceled" -> SManga.CANCELLED
else -> SManga.UNKNOWN
}
}
}

View File

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

View File

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