track number sorts alphabetically rather than numerically

Bug #1909614 reported by Be
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Medium
Daniel Schürmann

Bug Description

See attached screenshot

This is quite annoying when adding a whole album to AutoDJ

Revision history for this message
Be (be.ing) wrote :
Changed in mixxx:
importance: Undecided → Medium
milestone: none → 2.3.0
description: updated
Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

Track "numbers" are actually strings and not numerical values.

Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

Most file tag formats also allow arbitrary strings, not only integers.

Revision history for this message
LeDucDuBleuet (eleduc) wrote :

Quite annoying indeed! As a workaround, I am using the file location column for sorting by track number since most of my files are numbered with leading zeros, it works for now.

@uklotzde Maybe so but the track number column used to be sorted numerically like in any music player and I think it should go back to this default behavior since it does not make any sense to sort this column alphanumerically.

Also, the Played column used to be sorted by number of times played instead of alphanumerically as well... Both columns should be sorted numerically by default like it was before. I'll have a look at the source code but do not hold your breath for me since I am just beginning with Mixxx sources structure.

Thank you for looking into this and let me know if I can be of any help for testing.

Changed in mixxx:
status: New → Confirmed
Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

It is an string field both in the Mixxx database and many tagging formats and will remain so.

If anyone has ideas how to handle sorting by track number properly please file a pull request. Ignoring non-numerical values is not an option.

Btw, sorting by track number is only meaningful within an album, i.e. as a secondary sorting criteria. Padding with zero works well for this use case.

Revision history for this message
Be (be.ing) wrote :

> Ignoring non-numerical values is not an option.

I disagree. IMO that is being pedantic. This used to work in Mixxx, it still should. I have never once seen a nonnumerical value in a track number tag. I don't really care of it's theoretically possible to have nonnumerical values if the result of treating the data that way is sorting incorrectly. The entire point of the tag is sorting tracks in an album. Left padding every single track in my collection would be absurd. No other program requires that.

Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

When did this ever work in Mixxx as stated? I am not aware of any changes in our code that could have affected the sort behavior of the tracknumber column, see BaseSqlTableModel::setSort().

Revision history for this message
Be (be.ing) wrote :

This worked in Mixxx 2.2. The alphabetical sorting is a regression.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

The issue is caused by a index lockup in an enum table. I will prepare a fix.

Changed in mixxx:
assignee: nobody → Daniel Schürmann (daschuer)
Revision history for this message
Daniel Schürmann (daschuer) wrote :
Changed in mixxx:
status: Confirmed → Fix Committed
Revision history for this message
LeDucDuBleuet (eleduc) wrote :

Thank you, this is fixed with the latest commit.

Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/10266

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.