fix(ui): ensure album tracks are always ordered by disc and track number (fixes #3720)

This commit is contained in:
Deluan 2025-04-16 19:32:47 -04:00
parent 524d508916
commit b5bc851c87
2 changed files with 2 additions and 1 deletions

View File

@ -81,6 +81,7 @@ func NewMediaFileRepository(ctx context.Context, db dbx.Builder) model.MediaFile
"random": "random",
"created_at": "media_file.created_at",
"starred_at": "starred, starred_at",
"album_tracks": "disc_number, track_number",
})
return r
}

View File

@ -35,7 +35,7 @@ const AlbumShowLayout = (props) => {
addLabel={false}
reference="song"
target="album_id"
sort={{ field: 'album', order: 'ASC' }}
sort={{ field: 'album_tracks', order: 'ASC' }}
perPage={0}
pagination={null}
>