diff options
author | Martijn Kaijser <martijn@xbmc.org> | 2016-06-20 13:07:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-20 13:07:48 +0200 |
commit | 50ca59bf054a36e173ee88fc24c905aeddc9f188 (patch) | |
tree | e955d2c1b82d08654c4bd8cf159bc73981dbfa77 | |
parent | 9b312193ff99da42bdedb5e72c4240b0cd057a87 (diff) | |
parent | 2f8b539f3341a3eb7592a871e0a65c2c5a587107 (diff) |
Merge pull request #10014 from notspiff/fix_album_userrating
fixed: i think this was supposed to be 10. cut-and-paste ftw
-rw-r--r-- | xbmc/music/Album.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xbmc/music/Album.cpp b/xbmc/music/Album.cpp index 413b53da6e..a09176688d 100644 --- a/xbmc/music/Album.cpp +++ b/xbmc/music/Album.cpp @@ -391,9 +391,9 @@ bool CAlbum::Load(const TiXmlElement *album, bool append, bool prioritise) float max_rating = 10; XMLUtils::GetFloat(album, "userrating", rating); if (userrating->QueryFloatAttribute("max", &max_rating) == TIXML_SUCCESS && max_rating >= 1) - rating *= (5.f / max_rating); // Normalise the Rating to between 0 and 10 - if (rating > 5.f) - rating = 5.f; + rating *= (10.f / max_rating); // Normalise the Rating to between 0 and 10 + if (rating > 10.f) + rating = 10.f; iUserrating = MathUtils::round_int(rating); } XMLUtils::GetInt(album, "votes", iVotes); |