Bugzilla – Bug 3392
multiple genre tags for ID3v2.4 (null separated) not supported
Last modified: 2008-09-15 14:38:25 UTC
I have some files with multiple genres in ID3v2.4 tags. The genres are separated by \000 characters. (I have verified that with a hex editor) Slimserver does only recognize the first genre. I know this is supposed to be fixed (bug 217), but I cannot get it to work. Files have been tagged with MP3tag v2.35o (not 2.35 - that created multiple TCON fields.)
Created attachment 1227 [details] Sample file with ID3v2.4 null separated genre list This file has multiple genres, but only the first is recognized by slimserver
This format isn't valid according to the ID3 spec. Sounds like it was a bug in your tagging program.
From http://www.id3.org/id3v2.4.0-frames.txt I read: "All text information frames supports multiple strings, stored as a null separated list, where null is reperesented by the termination code for the charater encoding." (Section 4.2) As I understand it, this is the format used in the sample file. Also I don't know whether there should be a single or double null-character at the end of the list. I would be willing to look into the code myself, if we can clarify the issue.
Aha - thanks. I was looking specifically at the TCON section. Fixed in change 7311
Just had a look at the change. Does Slimserver support UTF-16-tags? For UTF-16, it is two \0 instead of one.
Earlier in the processing Unicode handling is done. Additionally, multiple nulls are turned into 1 null in the TCON loop.
Ah, didn't see that - ok. However the fix did not work for me. I changed it the following way - now it works. (I thin \w doesn't match space and AFAIK space is allowed for genres, i.e.: "Progressive Rock") Index: Info.pm =================================================================== --- Info.pm (revision 7415) +++ Info.pm (working copy) @@ -948,10 +948,10 @@ $data = \@genres; - } elsif ($data =~ /^(\w+)\000/) { + } elsif ($data =~ /^[^\000]+\000/) { # name genres separated by nulls. - $data = [ split /\0/, $data ]; + $data = [ split /\000/, $data ]; } # Text based genres will fall through.
This bug fix is now part of a released version, and so has been marked closed. If you are still experiencing this problem, please reopen the bug.