FS#12888 - Discnumber tag is not honoured for large numbers

Attached to Project: Rockbox
Opened by Edward Rose (steady_bear) - Wednesday, 07 August 2013, 20:10 GMT
Last edited by Thomas Martitz (kugel.) - Wednesday, 15 January 2014, 22:24 GMT
Task Type Bugs
Category ID3 / meta data
Status Closed
Assigned To No-one
Operating System Sansa AMSv2
Severity Low
Priority Normal
Reported Version Release 3.12
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


A rather trivial bug, but I'll file it all the same:

Having a discnumber greater than 9 will cause miss ordering of discs/tracks. ie
1, 10, 11, 12, 2, 3, 4, 5, 6, 7, 8, 9

Adding a leading zero doesn't help, adding 100 to each number is the only current work around that I've found.
This task depends upon

Closed by  Thomas Martitz (kugel.)
Wednesday, 15 January 2014, 22:24 GMT
Reason for closing:  Fixed
Additional comments about closing:  84c7d61
Comment by menachem shapiro (menachem) - Wednesday, 07 August 2013, 22:13 GMT
Check out the "Interpret numbers when sorting." setting, in "General Settings|File View". From the manual:

As whole numbers enables a sorting algorithm which is similar to the default sorting of, for example, Windows Explorer, Mac OS X’s Finder or Nautilus, with regards to numbers at the beginning or within filenames. It combines consecutive digits to a number used for sorting, taking leading zeros into account.
As digits disables this algorithm, and causes every digit to be compared separately. The following table demonstrates the two sorting methods."
Comment by Edward Rose (steady_bear) - Thursday, 08 August 2013, 12:32 GMT
Cheers for the thought, unfortunately the disc sorting algorithm seems to be entirely independent of this option.
Comment by Thomas Martitz (kugel.) - Wednesday, 15 January 2014, 22:24 GMT
I fixed this. Just as a hint: You can change tagnavi.config (or create your own with a different name) to change how tags are displayed. This then affects the sorting. For example you could have avoided this by changing the line

%format "fmt_title" "%d.%02d. %s - %02d:%02d" discnum tracknum title Lm Ls ? discnum > "0"


%format "fmt_title" "%02d.%02d. %s - %02d:%02d" discnum tracknum title Lm Ls ? discnum > "0".

Anyway, I changed it so the "Interpret numbers when sorting" affects the database browser too.