Library sorts track numbers as strings
Bug #596345 reported by
William Good
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mixxx |
Fix Released
|
Low
|
William Good | ||
1.8 |
Fix Released
|
Low
|
William Good |
Bug Description
The library sorts track numbers as "1 10 2 3 4 5 ... 9" instead of "1 2 3 4 ... 9 10", because sqlite is being told to order the result set by the raw "tracknumber" column, which is stored as a string (presumably to accommodate formats which store track numbers like "1/10" for the first of a ten-number album).
See attached screenshot for example.
Related branches
lp://staging/mixxx/1.8
(Merged)
Changed in mixxx: | |
milestone: | none → 1.8.0 |
status: | New → Confirmed |
Changed in mixxx: | |
milestone: | 1.8.0 → none |
Changed in mixxx: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Oi, should mention this affects trunk.
Attached patch is one possible solution, telling sqlite to sort the column as a number. In the case it can't find a number (i.e. if the first non-whilespace character is non-numeric), sqlite regards it to be 0 for the purposes of sorting (see http:// www.sqlite. org/lang_ expr.html ). If a string such as "1/10" is stored, it will be sorted as "1".