Komga: Add random sort option for Komga 1.16.0 (#6963)

Komga: Add random sort option
This commit is contained in:
usagisang 2025-01-04 07:53:56 +08:00 committed by Draff
parent 3e2f37043b
commit 5d402cc101
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
3 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,7 @@
ext {
extName = 'Komga'
extClass = '.KomgaFactory'
extVersionCode = 58
extVersionCode = 59
}
apply from: "$rootDir/common.gradle"

View File

@ -156,6 +156,7 @@ open class Komga(private val suffix: String = "") : ConfigurableSource, Unmetere
1 -> if (type == "series") "metadata.titleSort" else "name"
2 -> "createdDate"
3 -> "lastModifiedDate"
4 -> "random"
else -> return@forEach
} + "," + if (state.ascending) "asc" else "desc"

View File

@ -19,7 +19,7 @@ internal class TypeSelect : Filter.Select<String>(
internal class SeriesSort(selection: Selection? = null) : Filter.Sort(
"Sort",
arrayOf("Relevance", "Alphabetically", "Date added", "Date updated"),
arrayOf("Relevance", "Alphabetically", "Date added", "Date updated", "Random"),
selection ?: Selection(0, false),
)