Bugzilla – Bug 3292
Play artist plays by tracknumber instead of album
Last modified: 2008-09-15 14:38:10 UTC
When playing or adding tracks by artist in the web interface in 6.2.2 svn 6933, tracks are added in tracknumber order, rather than in album order as before. Shuffle mode is off. For example- 1. 1. Album One 2. 1. Album Two 3. 1. Album Three 4. 2. Album One 5. 2. Album Two 6. 2. Album Three ..etc.. Instead of 1. 1. Album One 2. 2. Album One 3. 3. Album One 4. 1. Album Two 5. 2. Album Two 6. 3. Album Two
seems this is ok with 6.5, so somewhere there is a (hopefully simple) port.
I think it's probably just a missing/wrong order_by/sort.
oops, I was wrong about 6.5. Seems I was fooled by too small a test. With an artist of more than two albums, its a bit more obviously wrong :)
I can fix this by changing the %sortFieldMap in DataModel.pm: 'track' => ['albums.titlesort','tracks.disc','tracks.tracknum','tracks.titlesort'], Sorting uses 'track' whenever there is no predetermined album in the find, tracknum when album does exist. If there is only one album then the first sort item is irrelevant and we get the same results as if it were not there. If there ARE multiple albums, then we get them in album title order (can use albums.year if we wanted to be chronological). With the more flexible sort options in 6.5, this would be open to user manipulation.
Fixed in change 7128