Total number of tracks not read from file tags

Bug #1530203 reported by Uwe Klotz
4
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Medium
Unassigned

Bug Description

Mixxx only reads the track number, but ignores the total number of tracks.

TagLib does not provide a common API for total tracks. The total number of tracks is stored differently depending on the tag type:
- ID3v2/APE: Optionally appended to the track number string: "<trackNumber>" or "<trackNumber>/<totalTracks>"
- MP4: Track number and total tracks are stored together in a single atom as a pair of integers
- Vorbis Comments: Stored in a separate field "TRACKTOTAL" (sometimes "TOTALTRACKS")

The missing handling of total tracks becomes even worse when enabling tag writing. In this case the total number of tracks tag is lost (ID3v2/APE) or reset to 0 (MP4) internally by TagLib.

Solution:
The track number in Mixxx is already represented as a string. This string should be formatted according to the ID3v2/APE convention with an optional number of total tracks appended, separated by a single slash "/" from the track number. When updating tags in files this string will either be written directly into the corresponding frame/item for ID3v2/APE or split into separate numbers for MP4 and Vorbis Comments. This change is backwards compatible and does not require an update of the database schema.

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

The proposed solution is already implemented as part of the "Write audio tags" PR:

https://github.com/mixxxdj/mixxx/pull/728

I will open a separate PR for this issue after the "PlayCounter" PR has been merged. The "PlayCounter" PR is actually unrelated, but rebasing the "Write audio tags" PR on multiple base branches to keep it aligned with master would be too much effort.

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

This is a fix I would like to see for 2.1, even if tag writing is still disabled. The longer we ignore the total number of tracks, the more information is missing in the Mixxx library. This becomes obvious when writing metadata from the Mixxx library back into file tags.

Changed in mixxx:
milestone: none → 2.1.0
importance: Undecided → Medium
Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :
Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

I forgot to update the table views:
https://github.com/mixxxdj/mixxx/pull/835

Changed in mixxx:
status: In Progress → Fix Committed
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/8398

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.