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 Deluan Quintão
parent b6e9ec4db4
commit bc6b175414
1 changed files with 1 additions and 1 deletions

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