Skip to content

Commit

Permalink
feat: sort series by random
Browse files Browse the repository at this point in the history
Closes: #1558
  • Loading branch information
gotson committed Dec 19, 2024
1 parent 09bc445 commit d50646f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions komga-webui/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,7 @@
"name": "Name",
"number": "Number",
"page_count": "Page count",
"random": "Random",
"release_date": "Release date"
},
"theme": {
Expand Down
1 change: 1 addition & 0 deletions komga-webui/src/views/BrowseLibraries.vue
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ export default Vue.extend({
{name: this.$t('sort.release_date').toString(), key: 'booksMetadata.releaseDate'},
{name: this.$t('sort.folder_name').toString(), key: 'name'},
{name: this.$t('sort.books_count').toString(), key: 'booksCount'},
{name: this.$t('sort.random').toString(), key: 'random'},
] as SortOption[]
},
filterOptionsList(): FiltersOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ class SeriesDtoDao(
"collection.number" to cs.NUMBER,
"name" to s.NAME.collate(SqliteUdfDataSource.COLLATION_UNICODE_3),
"booksCount" to s.BOOK_COUNT,
"random" to DSL.rand(),
)

override fun findAll(pageable: Pageable): Page<SeriesDto> = findAll(SeriesSearch(), SearchContext.ofAnonymousUser(), pageable)
Expand Down

0 comments on commit d50646f

Please sign in to comment.