Rockbox General > Rockbox General Discussion
Tracknum sort order in Database
TheEther:
I've searched and read all of the posts I could identify so far concerning the Track/Tracknum ID3 tag value when using the Database. I have todays build on an IPOD 5.5 30G.
The Database does correctly sort my tracks using the Tracknum value when viewing tracks by artist>album. The problem I have is that I have albums that have more than 200 tracks that require that specific order (it works correctly on IPOD OS). The Rockbox database only sorts by tracknum correctly when there are less than 99 tracks in an album . Let me demonstrate the issue:
Under normal curcumstacnes when one has 99 tracks or less in an album it looks like this on sort by tracknum:
01
02
03
04
05
06
07
08
09
10
11
12
13
......and so on up to 99, exactly as it should be.....
However, when there are more than 99 tracks it does the following on sort by tracknum:
01
02
03
04
05
06
07
08
09
10
100
101
102
103
104
105
106
107
108
109
11
110
111
...and so on.
Is this a bug or is there something I can adjust to properly handle the files?
Thanks
TheEther
bascule:
It's because the sorting is done using the tracknum as a string, not as an integer and is formatted to two digits.
Do this:
Go into .rockbox/tagnavi.config
Change this line:
%format "fmt_title" Â Â Â "%02d. %s" tracknum title ? tracknum > "0"
to
%format "fmt_title" Â Â Â "%03d. %s" tracknum title ? tracknum > "0"
And any others where the tracknum format is %02d
Bear in mind that unless you change to a custom tagnavi file (see my sig), this change will be lost every time you update your build.
TheEther:
Much appreciated, I changed it and it works correctly now!
Thanks
The Ether..
Lars:
If I try to change those format values in the "tagnavi_custom.config" they seem to have no efcect. Could it be that format values can't be changed in that navi files after they have been defined?
Regards, Lars
bascule:
--- Quote from: Lars on March 21, 2007, 06:38:57 PM ---If I try to change those format values in the "tagnavi_custom.config" they seem to have no effect. Could it be that format values can't be changed in that navi files after they have been defined?
Regards, Lars
--- End quote ---
If you are using the same format name, then yes. Rockbox uses the first instance of the format that meet the criteria.
--- Quote from: http://www.rockbox.org/twiki/bin/view/Main/DataBase#tagnavi_config_v2_0_Syntax ---%format "fmt_title" "%02d. %s" tracknum title ? tracknum > "0"
%format "fmt_title" "%s" title
It is possible to use the same fmt_identifier with different definitions.
The first line where the condition is true is applied, so it is suggested to use an unconditional line as a "catch all" at the end.
--- End quote ---
So if you have a third definition of "fmt_title" in your tagnavi_custom.config, it will be third on that list and never get triggered.
As you use a custom file, it would be better to define your own formats
e.g., "custom_title" "%03d. %s" tracknum title ? tracknum > "0"
Navigation
[0] Message Index
[#] Next page
Go to full version