Use same album songs order for UI and Subsonic API
This commit is contained in:
parent
15b289201a
commit
9e84ce42b5
1 changed files with 1 additions and 1 deletions
|
|
@ -77,7 +77,7 @@ func (r mediaFileRepository) GetAll(options ...model.QueryOptions) (model.MediaF
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r mediaFileRepository) FindByAlbum(albumId string) (model.MediaFiles, error) {
|
func (r mediaFileRepository) FindByAlbum(albumId string) (model.MediaFiles, error) {
|
||||||
sel := r.selectMediaFile().Where(Eq{"album_id": albumId}).OrderBy("disc_number", "track_number", "artist", "title")
|
sel := r.selectMediaFile(model.QueryOptions{Sort: "album"}).Where(Eq{"album_id": albumId})
|
||||||
res := model.MediaFiles{}
|
res := model.MediaFiles{}
|
||||||
err := r.queryAll(sel, &res)
|
err := r.queryAll(sel, &res)
|
||||||
return res, err
|
return res, err
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue