Galaxy: Add DLC info to game details only if DLC has any files

This commit is contained in:
Sude 2017-09-15 13:06:02 +03:00
parent fd27b93486
commit 2d70bdfacb

View File

@ -327,6 +327,8 @@ gameDetails galaxyAPI::productInfoJsonToGameDetails(const Json::Value& json, con
for (unsigned int j = 0; j < dlc_gamedetails.languagepacks.size(); ++j) for (unsigned int j = 0; j < dlc_gamedetails.languagepacks.size(); ++j)
dlc_gamedetails.languagepacks[j].type |= GFTYPE_DLC; dlc_gamedetails.languagepacks[j].type |= GFTYPE_DLC;
// Add DLC only if it has any files
if (!dlc_gamedetails.installers.empty() || !dlc_gamedetails.extras.empty() || !dlc_gamedetails.patches.empty() || !dlc_gamedetails.languagepacks.empty())
gamedetails.dlcs.push_back(dlc_gamedetails); gamedetails.dlcs.push_back(dlc_gamedetails);
} }
} }