private boolean setV1Tag(File file, DataSet dataset) {
RandomAccessFile raf = null;
try {
raf = new RandomAccessFile(file, "rw");
Id3v1Tag tag = new Id3v1Tag();
tag.setTitle(dataset.getTitle());
tag.setTrack(dataset.getTrack());
tag.setArtist(dataset.getArtist());
tag.setAlbum(dataset.getAlbum());
tag.setGenre(dataset.getGenre());
tag.setComment(dataset.getComment());
tag.setYear(dataset.getYear());
new Id3v1TagWriter().write(tag, raf);
return true;
} catch (Exception e) {
logger.warn("Couldn't write ID3V1 tag", e);