mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2024-11-20 11:49:17 +01:00
Use update/notification flags for patches
This commit is contained in:
parent
214a843e2c
commit
6eba3c76cc
@ -431,7 +431,7 @@ gameDetails API::getGameDetails(const std::string& game_name, const unsigned int
|
||||
else
|
||||
{
|
||||
game.patches.push_back(
|
||||
gameFile( false, /* patches don't have "updated" flag */
|
||||
gameFile( patch["notificated"].isInt() ? patch["notificated"].asInt() : std::stoi(patch["notificated"].asString()),
|
||||
patch["id"].isInt() ? std::to_string(patch["id"].asInt()) : patch["id"].asString(),
|
||||
patch["name"].asString(),
|
||||
patch["link"].asString(),
|
||||
@ -477,7 +477,7 @@ gameDetails API::getGameDetails(const std::string& game_name, const unsigned int
|
||||
else
|
||||
{
|
||||
game.patches.push_back(
|
||||
gameFile( false, /* patches don't have "updated" flag */
|
||||
gameFile( patchnode["notificated"].isInt() ? patchnode["notificated"].asInt() : std::stoi(patchnode["notificated"].asString()),
|
||||
patchnode["id"].isInt() ? std::to_string(patchnode["id"].asInt()) : patchnode["id"].asString(),
|
||||
patchnode["name"].asString(),
|
||||
patchnode["link"].asString(),
|
||||
|
@ -361,6 +361,7 @@ void Downloader::listGames()
|
||||
<< "\tname: " << games[i].patches[j].name << std::endl
|
||||
<< "\tpath: " << games[i].patches[j].path << std::endl
|
||||
<< "\tsize: " << games[i].patches[j].size << std::endl
|
||||
<< "\tupdated: " << (games[i].patches[j].updated ? "True" : "False") << std::endl
|
||||
<< "\tlanguage: " << languages << std::endl
|
||||
<< std::endl;
|
||||
}
|
||||
@ -408,6 +409,7 @@ void Downloader::listGames()
|
||||
<< "\tname: " << games[i].dlcs[j].installers[k].name << std::endl
|
||||
<< "\tpath: " << games[i].dlcs[j].installers[k].path << std::endl
|
||||
<< "\tsize: " << games[i].dlcs[j].installers[k].size << std::endl
|
||||
<< "\tupdated: " << (games[i].dlcs[j].installers[k].updated ? "True" : "False") << std::endl
|
||||
<< std::endl;
|
||||
}
|
||||
for (unsigned int k = 0; k < games[i].dlcs[j].patches.size(); ++k)
|
||||
@ -801,6 +803,10 @@ void Downloader::download()
|
||||
{
|
||||
for (unsigned int j = 0; j < games[i].patches.size(); ++j)
|
||||
{
|
||||
// Not updated, skip to next patch
|
||||
if (config.bUpdateCheck && !games[i].patches[j].updated)
|
||||
continue;
|
||||
|
||||
// Get link
|
||||
std::string url = gogAPI->getPatchLink(games[i].gamename, games[i].patches[j].id);
|
||||
if (gogAPI->getError())
|
||||
|
Loading…
Reference in New Issue
Block a user