Skip to content

Commit

Permalink
TagReaderTagLib: Touch file over saving cover art
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaski committed Mar 26, 2023
1 parent 49384ce commit 2b9e7db
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ext/libstrawberry-tagreader/tagreadertaglib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,15 @@ bool TagReaderTagLib::SaveEmbeddedArt(const spb::tagreader::SaveEmbeddedArtReque
// Not supported.
else return false;

return fileref.file()->save();
const bool result = fileref.file()->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)
utimensat(0, QFile::encodeName(filename).constData(), nullptr, 0);
}
#endif // Q_OS_LINUX

return result;

}

Expand Down

0 comments on commit 2b9e7db

Please sign in to comment.