MangAdventure: fix sort filter & description (#10074)
This commit is contained in:
parent
96d01c1285
commit
2cf0e7779f
|
@ -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()
|
||||
|
|
|
@ -29,18 +29,18 @@ internal class Artist : Filter.Text("Artist"), UriFilter {
|
|||
*/
|
||||
internal class SortOrder(
|
||||
private val labels: Array<String>
|
||||
) : 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"
|
||||
)
|
||||
}
|
||||
|
|
|
@ -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"),
|
||||
|
|
Loading…
Reference in New Issue