Bug 188578 - TCON munging screws up some genre tags
Summary: TCON munging screws up some genre tags
Status: RESOLVED FIXED
Alias: None
Product: taglib
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Scott Wheeler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-01 01:30 UTC by Michael Smith
Modified: 2009-07-11 14:55 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Fix TCON munging (1.10 KB, patch)
2009-04-01 01:30 UTC, Michael Smith
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Smith 2009-04-01 01:30:59 UTC
Created attachment 32508 [details]
Fix TCON munging

Originally from here: http://bugzilla.songbirdnest.com/show_bug.cgi?id=15971

The user attached some files that taglib was importing the genre as "22 Death Metal", etc, rather than just "Death Metal".

From that report:

So these files have genre like:
 "22\000Death Metal" - i.e. with an embedded NULL. That's perfectly ok
according to id3v2 - it's a list of 2 genres. In this case, "22" (which is used
as an index in the id3v1 genre list - 22 is "Death Metal"), and "Death Metal".
So this is just specifying the same genre in two ways.

taglib mostly handles this correctly, except in one spot - when reading the
tags, it tries to munge the id3v2.3 style "(22)" into the id3v2.4 style "22",
and gets this wrong when the TCON tag has multiple things listed.
Comment 1 Lukáš Lalinský 2009-07-11 14:55:38 UTC
SVN commit 994805 by lalinsky:

TCON parsing fixes

 * Don't join multiple 2.4 TCON fields together
 * Don't add duplicate fields for 2.3 genres where the refinement matches the ID3v1 genre

Patch by Michael Smith
BUG:188578


 M  +22 -16    taglib/mpeg/id3v2/id3v2framefactory.cpp  
 M  +62 -0     tests/test_id3v2.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=994805