mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Scraping using ScreenScraper now always shows the ratings in the GUI.
This commit is contained in:
parent
e6f16be221
commit
ab2b29f398
|
@ -83,8 +83,7 @@ GuiScraperSearch::GuiScraperSearch(
|
|||
mMD_Players = std::make_shared<TextComponent>(mWindow, "", font, mdColor);
|
||||
mMD_Filler = std::make_shared<TextComponent>(mWindow, "", font, mdColor);
|
||||
|
||||
if (Settings::getInstance()->getBool("ScrapeRatings") &&
|
||||
Settings::getInstance()->getString("Scraper") != "thegamesdb")
|
||||
if (Settings::getInstance()->getString("Scraper") != "thegamesdb")
|
||||
mScrapeRatings = true;
|
||||
|
||||
if (mScrapeRatings)
|
||||
|
|
|
@ -319,7 +319,11 @@ void ScreenScraperRequest::processGame(const pugi::xml_document& xmldoc,
|
|||
result.mdl.get("name");
|
||||
|
||||
// Validate rating.
|
||||
if (Settings::getInstance()->getBool("ScrapeRatings") && game.child("note")) {
|
||||
// Process the rating even if the setting to scrape ratings has been disabled.
|
||||
// This is required so that the rating can still be shown in the scraper GUI.
|
||||
// GuiScraperSearch::saveMetadata() will take care of skipping the rating saving
|
||||
// if this option has been set as such.
|
||||
if (game.child("note")) {
|
||||
float ratingVal = (game.child("note").text().as_int() / 20.0f);
|
||||
// Round up to the closest .1 value, i.e. to the closest half-star.
|
||||
ratingVal = Math::ceilf(ratingVal / 0.1) / 10;
|
||||
|
|
Loading…
Reference in a new issue