Fix ratings not saved to file tag (Fix #6385)

Commit 96a7e18a8d by @smithjd15 from
2019-04-03 fixed a number of potential zero-value field values, but it
also flipped the early exit condition skipping saving a rating to file.

It seems out of place with the rest of the commit, so considering it a
mistake and reverting to the original condition.

Manually tested; works and saves again ratings to file.
This commit is contained in:
Ronan Jouchet 2019-08-09 03:09:17 +02:00
parent 546078c317
commit 483be6ef7c
1 changed files with 1 additions and 1 deletions

View File

@ -981,7 +981,7 @@ bool TagReader::SaveSongRatingToFile(
if (filename.isNull()) return false;
qLog(Debug) << "Saving song rating tags to" << filename;
if (song.rating()) {
if (song.rating() < 0) {
// The FMPS spec says unrated == "tag not present". For us, no rating
// results in rating being -1, so don't write anything in that case.
// Actually, we should also remove tag set in this case, but in