feat(subsonic): sort genres alphabetically by default
This commit is contained in:
@@ -452,6 +452,7 @@ func (c *Controller) ServeGetGenres(_ *http.Request) *spec.Response {
|
|||||||
(SELECT count(1) FROM album_genres WHERE genre_id=genres.id) album_count,
|
(SELECT count(1) FROM album_genres WHERE genre_id=genres.id) album_count,
|
||||||
(SELECT count(1) FROM track_genres WHERE genre_id=genres.id) track_count`).
|
(SELECT count(1) FROM track_genres WHERE genre_id=genres.id) track_count`).
|
||||||
Group("genres.id").
|
Group("genres.id").
|
||||||
|
Order("genres.name").
|
||||||
Find(&genres)
|
Find(&genres)
|
||||||
sub := spec.NewResponse()
|
sub := spec.NewResponse()
|
||||||
sub.Genres = &spec.Genres{
|
sub.Genres = &spec.Genres{
|
||||||
|
|||||||
Reference in New Issue
Block a user