From 160f11e05c9388ed5c1c6cb257c498cbe6b42b60 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 1 May 2018 23:07:28 +0200 Subject: [PATCH] tmdb: show decimal points in rating stars Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/a873e5b2b273565d38ef861a997b30ce896f1af2 Author: vanhofen Date: 2018-05-01 (Tue, 01 May 2018) Origin message was: ------------------ - tmdb: show decimal points in rating stars ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/epgview.cpp | 2 -- src/gui/tmdb.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index 4852dea8e..79ecdb16a 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -297,8 +297,6 @@ void CEpgData::showText(int startPos, int ypos, bool has_cover, bool fullClear) if (tmdb_active) { provider_logo = NEUTRINO_ICON_TMDB; - if (tmdb_stars <= 10) - tmdb_stars *= 10; // recalculate tmdb_stars value for starbar stars = tmdb_stars; } else if (imdb_active) diff --git a/src/gui/tmdb.h b/src/gui/tmdb.h index 6675955f4..b1f4e40ef 100644 --- a/src/gui/tmdb.h +++ b/src/gui/tmdb.h @@ -73,7 +73,7 @@ class cTmdb bool getBigCover(std::string cover) { return DownloadUrl("http://image.tmdb.org/t/p/w342" + minfo.poster_path, cover);} bool getSmallCover(std::string cover) { return DownloadUrl("http://image.tmdb.org/t/p/w185" + minfo.poster_path, cover);} int getResults() { return minfo.result;} - int getStars() { return (int) (atof(minfo.vote_average.c_str())+0.5);} + int getStars() { return (int) (atof(minfo.vote_average.c_str())*10);} }; #endif