Setting Song Lyrics Causes Warning
Hi,
I'm coming across a strange issue that I've narrowed down to setting song lyrics in a ID3v2 tag in MP3 files. The warning :
Oct 24, 2016 5:59:41 PM org.jaudiotagger.tag.datatype.StringFixedLength writeByteArray WARNING: There was a problem writing the following StringFixedlength Field: when converted to bytes has length of:0 but field was defined with length of:3 too short so padding with spaces to make up extra length
Looking at the source this is coming from this method:
public byte[] writeByteArray()
in
StringFixedLength.class
This only happens when writing song lyrics into the MP3, whether I test with 3 words, or entire song lyrics. I have tested on 500+ different Mp3 files, all produce this Warning. I'm guessing this might have something to do with character encoding.
The method I use for settign the lyrics:
mp3File.getID3v2Tag().deleteField(FieldKey.LYRICS);
try {
mp3File.getID3v2Tag().addField(FieldKey.LYRICS, lyrics);
} catch (FieldDataInvalidException e) {
e.printStackTrace();
}
I have also tried just using:
mp3File.getID3v2Tag().setField(FieldKey.LYRICS, lyrics);
This produces the same warning.
Some guidance as to what I'm doing wrong would be appreciated, for now, its a warning hence why marked as minor.
Kind regards
Mark
Comments (1)
-
repo owner - Log in to comment
There may be a bug as I don't ever write LYRICS, I'll take a look when I can