You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
try
{
String[] song_SingerAlbum = path.getFileName().toString().split(fileExtention)[0].split(" by ");
String[] singer_album = song_SingerAlbum[1].split(" on ");
MP3File mp3File = new MP3File(path.toFile());
ID3v1 id3Tag = mp3File.getID3v1Tag();
if (id3Tag == null)
{
id3Tag = new ID3v1();
mp3File.setID3v1Tag(id3Tag);
}
id3Tag.setSongTitle(song_SingerAlbum[0]);
id3Tag.setLeadArtist(singer_album[0]);
id3Tag.setAlbumTitle(singer_album[1]);
mp3File.save();
}
catch (IOException | TagException e)
{
e.printStackTrace();
}
This is the error:
java.io.EOFException
at java.base/java.io.RandomAccessFile.readByte(RandomAccessFile.java:703)
at org.farng.mp3.id3.ID3v2_4Frame.read(ID3v2_4Frame.java:368)
at org.farng.mp3.id3.ID3v2_4Frame.(ID3v2_4Frame.java:353)
at org.farng.mp3.id3.ID3v2_4.read(ID3v2_4.java:522)
at org.farng.mp3.id3.ID3v2_4.(ID3v2_4.java:384)
at org.farng.mp3.MP3File.(MP3File.java:263)
at org.farng.mp3.MP3File.(MP3File.java:234)
at FileManipulation.lambda$1(FileManipulation.java:83)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at FileManipulation.doAddMP3Tags(FileManipulation.java:76)
at FileManipulation.doAskWhatToDo(FileManipulation.java:61)
at FileManipulation.main(FileManipulation.java:30)
NOTE: The very first time, I got error on set tag attributes, because I didn't check if it exists, but after I made it null safe, I always get error on the line that creates the mp3 file. It seems the file handling in the mp3 constructor is not good enough.
The text was updated successfully, but these errors were encountered:
The following code block breaks:
This is the error:
NOTE: The very first time, I got error on set tag attributes, because I didn't check if it exists, but after I made it null safe, I always get error on the line that creates the mp3 file. It seems the file handling in the mp3 constructor is not good enough.
The text was updated successfully, but these errors were encountered: