diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangadventure/MangAdventure.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangadventure/MangAdventure.kt index c9c184e38..b7ce6b1dc 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangadventure/MangAdventure.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangadventure/MangAdventure.kt @@ -172,9 +172,13 @@ abstract class MangAdventure( url = series.url title = series.title thumbnail_url = series.cover - description = series.description?.plus( - series.aliases?.joinToString("\n", "\n\nAlternative titles:\n") - ) + description = buildString { + series.description?.let(::append) + series.aliases.let { + if (!it.isNullOrEmpty()) + it.joinTo(this, "\n", "\n\nAlternative titles:\n") + } + } author = series.authors?.joinToString() artist = series.artists?.joinToString() genre = series.categories?.joinToString() diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangadventure/MangAdventureFilters.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangadventure/MangAdventureFilters.kt index 58b2727d0..a96b2119f 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangadventure/MangAdventureFilters.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangadventure/MangAdventureFilters.kt @@ -29,18 +29,18 @@ internal class Artist : Filter.Text("Artist"), UriFilter { */ internal class SortOrder( private val labels: Array -) : Filter.Sort("Sort", values, null), UriFilter { +) : Filter.Sort("Sort", labels, null), UriFilter { override val param = "sort" override fun toString() = when (state?.ascending) { null -> "" - true -> labels[state!!.index] - false -> "-" + labels[state!!.index] + true -> sorts[state!!.index] + false -> "-" + sorts[state!!.index] } companion object { /** The available sort order values. */ - private val values = arrayOf( + private val sorts = arrayOf( "title", "views", "latest_upload", "chapter_count" ) } diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangadventure/MangAdventureGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangadventure/MangAdventureGenerator.kt index e222b6eb9..5d9f832e8 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangadventure/MangAdventureGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangadventure/MangAdventureGenerator.kt @@ -9,7 +9,7 @@ class MangAdventureGenerator : ThemeSourceGenerator { override val themeClass = "MangAdventure" - override val baseVersionCode = 7 + override val baseVersionCode = 8 override val sources = listOf( SingleLang("Arc-Relight", "https://arc-relight.com", "en", className = "ArcRelight"),