Skip to content

Commit

Permalink
Add random as a valid sort option for song resource
Browse files Browse the repository at this point in the history
  • Loading branch information
deluan committed May 5, 2020
1 parent 29e2ab1 commit c585ca7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions persistence/mediafile_repository.go
Expand Up @@ -25,6 +25,7 @@ func NewMediaFileRepository(ctx context.Context, o orm.Ormer) *mediaFileReposito
r.sortMappings = map[string]string{
"artist": "order_artist_name asc, album asc, disc_number asc, track_number asc",
"album": "order_album_name asc, disc_number asc, track_number asc",
"random": "RANDOM()",
}
r.filterMappings = map[string]filterFunc{
"title": fullTextFilter,
Expand Down

0 comments on commit c585ca7

Please sign in to comment.