Problem with genre reading
Tony Pombo
mcp at technologist.com
Sat Mar 14 08:58:18 CET 2009
Fixed this behavior by adding this line before saving the tag:
if (!(id3v2tag->genre()==TagLib::String::null))
id3v2tag->setGenre(id3v2tag->genre()); // Convert number genre to string
It's simple, but seems otherwise unnecessary.
From: Tony Pombo [mailto:mcp at technologist.com]
Sent: Monday, March 02, 2009 12:33 PM
To: taglib-devel at kde.org
Subject: Problem with genre reading
I have an mp3 file with properly formatted ID3v2.3 and ID3v1.1 tags.
The genre is set to Soundtrack, and is stored correctly as (24) in the TCON
frame and as 0x18 in the ID3v1 tag.
When I execute the following lines:
TagLib::MPEG::File f(filename);
f.save();
Taglib strips off the parenthesis and stores 24 in the TCON frame.
Obviously, this is not the same. My music players now display the genre as
"24" instead of "Soundtrack".
After tracing through the code, "FrameFactory::updateGenre" is clearly
designed to do this. The ID3v2.3/4 specification explicitly allows the use
of v1 genres in v2 tags when the number is enclosed in parenthesis.
So, is this a mistake, or do I not understand something?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/taglib-devel/attachments/20090314/d2befc58/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3165 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/taglib-devel/attachments/20090314/d2befc58/attachment.bin
More information about the taglib-devel
mailing list