Merge pull request #531 from Spongman/patch-1

Update GamesDBJSONScraper.cpp
This commit is contained in:
Jools Wills 2019-02-19 05:53:29 +00:00 committed by GitHub
commit b7bec0eb87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -322,6 +322,9 @@ void processGame(const Value& game, const Value& boxart, std::vector<ScraperSear
result.mdl.set("players", std::to_string(game["players"].GetInt())); result.mdl.set("players", std::to_string(game["players"].GetInt()));
} }
if (boxart.HasMember("data") && boxart["data"].IsObject())
{
std::string id = std::to_string(getIntOrThrow(game, "id")); std::string id = std::to_string(getIntOrThrow(game, "id"));
if (boxart["data"].HasMember(id.c_str())) if (boxart["data"].HasMember(id.c_str()))
{ {
@ -329,6 +332,7 @@ void processGame(const Value& game, const Value& boxart, std::vector<ScraperSear
result.thumbnailUrl = baseImageUrlThumb + "/" + image; result.thumbnailUrl = baseImageUrlThumb + "/" + image;
result.imageUrl = baseImageUrlLarge + "/" + image; result.imageUrl = baseImageUrlLarge + "/" + image;
} }
}
results.push_back(result); results.push_back(result);
} }