mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-02-16 20:15:38 +00:00
Fixed an issue where invalid game entries were sometimes not filtered out from ScreenScraper server responses.
This commit is contained in:
parent
80e0937bf5
commit
1454783884
|
@ -277,13 +277,15 @@ void ScreenScraperRequest::process(const std::unique_ptr<HttpReq>& req,
|
||||||
// returned instead of a valid game name, and retrying a second time returns the proper
|
// returned instead of a valid game name, and retrying a second time returns the proper
|
||||||
// name. But it's basically impossible to know which is the case, and we really can't
|
// name. But it's basically impossible to know which is the case, and we really can't
|
||||||
// compensate for errors in the scraper service.
|
// compensate for errors in the scraper service.
|
||||||
for (auto it = results.cbegin(); it != results.cend(); ++it) {
|
for (auto it = results.cbegin(); it != results.cend();) {
|
||||||
std::string gameName {Utils::String::toUpper((*it).mdl.get("name"))};
|
const std::string gameName {Utils::String::toUpper((*it).mdl.get("name"))};
|
||||||
if (gameName.substr(0, 12) == "ZZZ(NOTGAME)") {
|
if (gameName.substr(0, 12) == "ZZZ(NOTGAME)") {
|
||||||
LOG(LogWarning) << "ScreenScraperRequest - Received \"ZZZ(notgame)\" as game name, "
|
LOG(LogWarning) << "ScreenScraperRequest - Received \"ZZZ(notgame)\" as game name, "
|
||||||
"ignoring response";
|
"ignoring response";
|
||||||
results.pop_back();
|
it = results.erase(it);
|
||||||
return;
|
}
|
||||||
|
else {
|
||||||
|
++it;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue