Field with key of:USLT:does not accept cannot parse data

Issue #256 closed
copluk created an issue

Hi, I am trying to write some text data as Lyrics but keep getting "Field with key of:USLT:does not accept cannot parse data" error

There aren't many samples around so I am having to ask here. Here is my code. IDTagPackage is my data holder class. getNotes() returns couple of lines of text terminated with '\n'.

Such as

00:00:00 Test note
00:00:00 Teat 2
00:00:00 Bshsh
 public static void updateNotes(File file, IDTagPackage idTagPackage) {
        if (file.exists()) {
            try {
                AudioFile audioFile = AudioFileIO.read(file);
                if (audioFile != null) {
                    if (!TextUtils.isEmpty(idTagPackage.getNotes())) {
                        TagOptionSingleton.getInstance().setId3v23DefaultTextEncoding(TextEncoding.UTF_8);
                        Tag tag = new ID3v24Tag();
                        tag.setField(FieldKey.LYRICS, idTagPackage.getNotes());
                        audioFile.commit();
                    }


                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

    }

Comments (1)

  1. Log in to comment