From d56b76c9e34a63b841fbfe0f0b27f76957e40351 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Mon, 23 Nov 2020 22:25:47 +0100 Subject: [PATCH] Save both ID3v1 and ID3v2 Fixes #598 --- ext/libstrawberry-tagreader/tagreader.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ext/libstrawberry-tagreader/tagreader.cpp b/ext/libstrawberry-tagreader/tagreader.cpp index 896f4f32..45b82850 100644 --- a/ext/libstrawberry-tagreader/tagreader.cpp +++ b/ext/libstrawberry-tagreader/tagreader.cpp @@ -537,7 +537,6 @@ bool TagReader::SaveFile(const QString &filename, const pb::tagreader::SongMetad fileref->tag()->setYear(song.year() <= 0 ? 0 : song.year()); fileref->tag()->setTrack(song.track() <= 0 ? 0 : song.track()); - bool saved = false; bool result = false; if (TagLib::FLAC::File *file = dynamic_cast(fileref->file())) { @@ -574,8 +573,6 @@ bool TagReader::SaveFile(const QString &filename, const pb::tagreader::SongMetad SetTextFrame("TPE2", song.albumartist().empty() ? std::string() : song.albumartist(), tag); SetTextFrame("TCMP", song.compilation() ? QString::number(1) : QString(), tag); SetUnsyncLyricsFrame(song.lyrics().empty() ? std::string() : song.lyrics(), tag); - result = file_mpeg->save(TagLib::MPEG::File::ID3v2); - saved = true; } else if (TagLib::MP4::File *file_mp4 = dynamic_cast(fileref->file())) { @@ -594,10 +591,7 @@ bool TagReader::SaveFile(const QString &filename, const pb::tagreader::SongMetad SetVorbisComments(tag, song); } - if (!saved) { - result = fileref->save(); - } - + result = fileref->save(); #ifdef Q_OS_LINUX if (result) { // Linux: inotify doesn't seem to notice the change to the file unless we change the timestamps as well. (this is what touch does)