Skip to content

Commit

Permalink
Komga: Add random sort option for Komga 1.16.0 (#6963)
Browse files Browse the repository at this point in the history
Komga: Add random sort option
  • Loading branch information
usagisang authored Jan 3, 2025
1 parent a6df6d7 commit a35da73
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/all/komga/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
extName = 'Komga'
extClass = '.KomgaFactory'
extVersionCode = 58
extVersionCode = 59
}

apply from: "$rootDir/common.gradle"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
)

Expand Down

0 comments on commit a35da73

Please sign in to comment.