Total number of tracks not read from file tags
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>
- 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 |
Changed in mixxx: | |
milestone: | none → 2.1.0 |
importance: | Undecided → Medium |
Changed in mixxx: | |
status: | In Progress → Fix Committed |
Changed in mixxx: | |
status: | Fix Committed → Fix Released |
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.