Commit 6014811f authored by Matěj Laitl's avatar Matěj Laitl
Browse files

TagDialog: correct rounding for rating

I still wonder how observant our users are. :-)

BUG: 273363
FIXED-IN: 2.6
parent 5adad3ea
......@@ -8,6 +8,7 @@ VERSION 2.6
argument.
BUGFIXES:
* Correct rounding for rating in Track Details dialog. (BR 273363)
* Fix Context view not being fully formed on startup. (BR 292895)
* Fix memory leaks and a string zero termination issue in MP3tunes.
* Don't poll for mounts every second, solid notifies us. (BR 289462)
......
......@@ -1084,7 +1084,8 @@ TagDialog::getTagsFromMultipleTracks() const
if( scoreCount > 0 )
map.insert( Meta::Field::SCORE, scoreSum / scoreCount );
if( ratingCount > 0 )
map.insert( Meta::Field::RATING, ratingSum / ratingCount );
// the extra fuzz is for emulating rounding to nearest integer
map.insert( Meta::Field::RATING, ( ratingSum + ratingCount / 2 ) / ratingCount );
map.insert( Meta::Field::FIRST_PLAYED, firstPlayed );
map.insert( Meta::Field::LAST_PLAYED, lastPlayed );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment