mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2024-11-20 11:49:17 +01:00
Get game details json for dlcs later if needed
Speeds up getting game details when dlcs don't need the info from json data
This commit is contained in:
parent
b5cdf10078
commit
c264f69eae
@ -276,15 +276,15 @@ int Downloader::getGameDetails()
|
||||
}
|
||||
if (game.dlcs.empty() && bHasDLC && conf.bDLC)
|
||||
{
|
||||
if (gameDetailsJSON.empty())
|
||||
gameDetailsJSON = this->getGameDetailsJSON(gameItems[i].id);
|
||||
|
||||
for (unsigned int j = 0; j < gameItems[i].dlcnames.size(); ++j)
|
||||
{
|
||||
gameDetails dlc;
|
||||
dlc = gogAPI->getGameDetails(gameItems[i].dlcnames[j], conf.iInstallerType, conf.iInstallerLanguage, config.bDuplicateHandler);
|
||||
if (dlc.extras.empty() && config.bExtras) // Try to get extras from account page if API didn't return any extras
|
||||
{
|
||||
if (gameDetailsJSON.empty())
|
||||
gameDetailsJSON = this->getGameDetailsJSON(gameItems[i].id);
|
||||
|
||||
// Make sure we get extras for the right DLC
|
||||
for (unsigned int k = 0; k < gameDetailsJSON["dlcs"].size(); ++k)
|
||||
{
|
||||
@ -304,6 +304,9 @@ int Downloader::getGameDetails()
|
||||
|
||||
if (config.bSaveSerials)
|
||||
{
|
||||
if (gameDetailsJSON.empty())
|
||||
gameDetailsJSON = this->getGameDetailsJSON(gameItems[i].id);
|
||||
|
||||
// Make sure we save serial for the right DLC
|
||||
for (unsigned int k = 0; k < gameDetailsJSON["dlcs"].size(); ++k)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user