Opened 15 years ago

Closed 14 years ago

#2592 closed defect (fixed)

Sorting problem in MythMusic

Reported by: anonymous Owned by: paulh
Priority: major Milestone: 0.21
Component: mythmusic Version: 0.20
Severity: medium Keywords:
Cc: stuartm Ticket locked: no


I have never been able to get MythMusic to sort correctly. Regardless of how I set it up, the result is always the first file alphabetically, and then the subsequent songs sorted in reverse alphabetical order.

If I turn on ID3 tags and rescan, it seems to appear correctly. However, my tags are somewhat out of whack.

I have tried with track numbers in the file names, without track numbers, et cetera. I always rescan to an empty directory and then rescan to my music directory, but nothing seems to change; it always appears in MythMusic similar to the example below:


For directories that have songs AAAAA BBBBB CCCCC etc.

OR 0-1-Whatever 0-18-Whatever 0-19-Whatever

For directories that have songs 1-Whatever 2-Whatever 3-Whatever

I have Filename Format set to: ARTIST/ALBUM/TITLE because that is how I have my directories setup (e.g. /Music/Korn/Follow? the Leader/SONGS).

also see:

It would also be great to add a new feature in MythMusic (as already mentioned on the Wiki-Wishlist)

allow Filesystem-based browsing (no need to create playlists)

Attachments (1)

2592.patch (1.4 KB) - added by myth@… 15 years ago.
Fix (kinda)

Download all attachments as: .zip

Change History (5)

Changed 15 years ago by myth@…

Attachment: 2592.patch added

Fix (kinda)

comment:1 Changed 15 years ago by anonymous

Attached path fixes the problem, by assigning an incremental track number to each track with a number of zero. This is done pr. MusicNode?, so essentially pr. directory.

This is a pretty crappy fix, since a track may be assigned a number that another track already has, also, the order is still determined by how they happen to appear in the db/directory and violates the principle of least astonishment.

A better fix would be for the reported to get a id3 tag tool like easytag and assign proper tags to the files and configure his/hers ripper to assign tags.

comment:2 Changed 14 years ago by stuartm

Cc: stuartm added

comment:3 Changed 14 years ago by paulh

Owner: changed from Isaac Richards to paulh

I think the best solution, which has already been mentioned, is to make sure your files are properly tagged.

The second solution is to rename your files to a format where MythMusic can get the proper track numbers from the filename. So you would use something like


You must use '-' as the separator here otherwise it wont work and you need to change the 'Filename Format' setting to something like 'ARTIST/ALBUM/TRACK_TITLE' If anyone cares enough about this and wants to improve the filename parsing, maybe to make extracting the track number a little smarter, take a look at MetatIO::readFromFilename() in metaio.cpp.

For people who can't or don't wont to rename there files I'm just about to commit something that at least sorts the tracks by the track title if it can't do it using the track numbers. It isn't perfect for example if you have tracks named something like 1-Track1 2-Track2 ... 10-Track10 then they will be displayed as 1-Track1 10-Track10 2-Track2, that is they are sorted alphabetically not numerically but it is better than what we have now.

comment:4 Changed 14 years ago by paulh

Resolution: fixed
Status: newclosed

(In [13365]) When sorting tracks in MythMusic and the track no's are the same use the track title to determin the sort order.

This fixes a problem where tracks that don't have a proper track number get sorted in a strange order. If there is no track numbers available then the tracks will now get sorted by the track title instead.

Fixes #2592.

Note: See TracTickets for help on using tickets.