mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14: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
|
||||
// name. But it's basically impossible to know which is the case, and we really can't
|
||||
// compensate for errors in the scraper service.
|
||||
for (auto it = results.cbegin(); it != results.cend(); ++it) {
|
||||
std::string gameName {Utils::String::toUpper((*it).mdl.get("name"))};
|
||||
for (auto it = results.cbegin(); it != results.cend();) {
|
||||
const std::string gameName {Utils::String::toUpper((*it).mdl.get("name"))};
|
||||
if (gameName.substr(0, 12) == "ZZZ(NOTGAME)") {
|
||||
LOG(LogWarning) << "ScreenScraperRequest - Received \"ZZZ(notgame)\" as game name, "
|
||||
"ignoring response";
|
||||
results.pop_back();
|
||||
return;
|
||||
it = results.erase(it);
|
||||
}
|
||||
else {
|
||||
++it;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue