Make getGenre Subsonic endpoint returns genres sorted by counts

This commit is contained in:
Deluan 2021-07-19 15:41:33 -04:00 committed by Joe Stump
parent 8d7cd365cf
commit 09603abe33
No known key found for this signature in database
GPG Key ID: 29151C3EC48A0EB9

View File

@ -207,7 +207,7 @@ func (c *BrowsingController) GetSong(w http.ResponseWriter, r *http.Request) (*r
func (c *BrowsingController) GetGenres(w http.ResponseWriter, r *http.Request) (*responses.Subsonic, error) {
ctx := r.Context()
genres, err := c.ds.Genre(ctx).GetAll(model.QueryOptions{Sort: "name"})
genres, err := c.ds.Genre(ctx).GetAll(model.QueryOptions{Sort: "song_count, album_count, name desc", Order: "desc"})
if err != nil {
log.Error(r, err)
return nil, err