FS#8859 - Problem with DISCNUMBER in the Database

Attached to Project: Rockbox
Opened by André Scheffler (belze) - Monday, 07 April 2008, 07:53 GMT
Last edited by Robert Kukla (roolku) - Monday, 07 April 2008, 10:57 GMT
Task Type Bugs
Category Database
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


I am using revision 16976 on a Sansa e200, but this should affect all players.

The database uses the DISCNUMBER-tag to create a view like <discno>.<track>, i.e. 4.01.

But if you tag a set of cds that has more than 9 cds, the ordering inside the database doesn't work correctly anymore, as it sorts like this:

1.01 ... 1.20
10.01 ... 10.20 <- !
11.01 ... 11.01 <- !
2.01 ... 2.02

I haven't tried filling up the DISCNUMER-tag with leading zeros, but I never noticed this was necessary on the track-no.
This task depends upon

Closed by  Robert Kukla (roolku)
Monday, 07 April 2008, 10:57 GMT
Reason for closing:  Not a Bug
Comment by Robert Kukla (roolku) - Monday, 07 April 2008, 10:54 GMT
The database uses the format string for sorting which is set to one digit for discnumber and 2 digits for tracknumber. If you want more digits to sort correctly, you can adapt the string in tagnavi.config (see )

For example change

%format "fmt_title" "%d.%02d. %s" discnum tracknum title ? discnum > "0"


%format "fmt_title" "%02d.%03d. %s" discnum tracknum title ? discnum > "0"

for 2 digit discnumbers and 3 digit track numbers. Note that tagnavi.config will get overwritten with every update, so the better option is to create your own tagnavi_custom.config.