sort getMusicDirectory dir children by name

closes #61
This commit is contained in:
sentriz
2020-04-25 19:19:10 +01:00
parent 92573de436
commit 82fa77808f

View File

@@ -65,6 +65,7 @@ func (c *Controller) ServeGetMusicDirectory(r *http.Request) *spec.Response {
var childFolders []*db.Album
c.DB.
Where("parent_id=?", id).
Order("albums.right_path COLLATE NOCASE").
Find(&childFolders)
for _, c := range childFolders {
childrenObj = append(childrenObj, spec.NewTCAlbumByFolder(c))