fix(subsonic): order some browse-by-tag responses

closes #512
This commit is contained in:
mikuta0407
2025-02-15 16:16:10 +00:00
committed by sentriz
parent 5c7d065fd7
commit 39df00ef8f
4 changed files with 16 additions and 0 deletions

No files matched your search

@@ -80,11 +80,13 @@ func (c *Controller) ServeGetMusicDirectory(r *http.Request) *spec.Response {
Where("parent_id=?", id.Value).
Preload("AlbumStar", "user_id=?", user.ID).
Preload("AlbumRating", "user_id=?", user.ID).
Order("tag_year").
Order("albums.right_path COLLATE NOCASE").
Find(&childFolders)
for _, ch := range childFolders {
childrenObj = append(childrenObj, spec.NewTCAlbumByFolder(ch))
}
// start looking for child childTracks in the current dir
var childTracks []*db.Track
c.dbc.
@@ -94,6 +96,7 @@ func (c *Controller) ServeGetMusicDirectory(r *http.Request) *spec.Response {
Preload("Artists").
Preload("TrackStar", "user_id=?", user.ID).
Preload("TrackRating", "user_id=?", user.ID).
Order("tag_track_number").
Order("filename").
Find(&childTracks)