- edited description
For ID3v23 the TCON frame can end up with multiple values concatenated
file.getTag().deleteField(FieldKey.GENRE);
file.getTag().addField(FieldKey.GENRE,"Genre1");
file.getTag().addField(FieldKey.GENRE,"Genre2");
file.commit();
file = new MP3File(testFile);
assertEquals("Genre1Genre2",file.getTag().getFirst(FieldKey.GENRE));
Basically for ID3v24 and for other multi value fields in ID3v23 we null separate the values, this is the official standard for ID3v24 but not for ID3v23. But for the Genre frame ID3v23 can support multiple values if in the ID3v1 list by using brackets e.g (23)(45), or if some are in and some are out might still be okay such as Genre1(34), we dont use the null separated method. But if have multiple values not in mapped to ID3v1 then we just end up with a single string such as Genre1Genre2.
So perhaps we should use null seperator, but shoud it be used only when needed, or all the time or should we use a more visible seperator such as ; or ,
Comments (7)
-
reporter -
reporter - edited description
-
reporter - edited description
-
reporter - changed title to For ID3 the TCON frame can end up with multiple values concatenated
- edited description
-
reporter This is rather tricky but improved it. If using ID3v23 and call addField() if it starts with '(' we assume its of the form of (23) or (RX) add to exiosting value as is, if not we prepend a null character.
-
reporter -
reporter - changed status to resolved
Done
- Log in to comment