mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2024-11-20 11:49:17 +01:00
Use remote xml data for patches
This commit is contained in:
parent
17dffe10f3
commit
0a20ef9ee7
@ -554,6 +554,18 @@ void Downloader::repair()
|
||||
continue;
|
||||
}
|
||||
|
||||
// Get XML data
|
||||
std::string XML = "";
|
||||
if (config.bRemoteXML)
|
||||
{
|
||||
XML = gogAPI->getXML(games[i].gamename, games[i].patches[j].id);
|
||||
if (gogAPI->getError())
|
||||
{
|
||||
std::cout << gogAPI->getErrorMessage() << std::endl;
|
||||
gogAPI->clearError();
|
||||
}
|
||||
}
|
||||
|
||||
std::string url = gogAPI->getPatchLink(games[i].gamename, games[i].patches[j].id);
|
||||
if (gogAPI->getError())
|
||||
{
|
||||
@ -562,7 +574,7 @@ void Downloader::repair()
|
||||
continue;
|
||||
}
|
||||
std::cout << "Repairing file " << filepath << std::endl;
|
||||
this->repairFile(url, filepath, std::string(), games[i].gamename);
|
||||
this->repairFile(url, filepath, XML, games[i].gamename);
|
||||
std::cout << std::endl;
|
||||
}
|
||||
}
|
||||
@ -652,6 +664,18 @@ void Downloader::repair()
|
||||
continue;
|
||||
}
|
||||
|
||||
// Get XML data
|
||||
std::string XML = "";
|
||||
if (config.bRemoteXML)
|
||||
{
|
||||
XML = gogAPI->getXML(games[i].dlcs[j].gamename, games[i].dlcs[j].patches[k].id);
|
||||
if (gogAPI->getError())
|
||||
{
|
||||
std::cout << gogAPI->getErrorMessage() << std::endl;
|
||||
gogAPI->clearError();
|
||||
}
|
||||
}
|
||||
|
||||
std::string url = gogAPI->getPatchLink(games[i].dlcs[j].gamename, games[i].dlcs[j].patches[k].id);
|
||||
if (gogAPI->getError())
|
||||
{
|
||||
@ -660,7 +684,7 @@ void Downloader::repair()
|
||||
continue;
|
||||
}
|
||||
std::cout << "Repairing file " << filepath << std::endl;
|
||||
this->repairFile(url, filepath, std::string(), games[i].dlcs[j].gamename);
|
||||
this->repairFile(url, filepath, XML, games[i].dlcs[j].gamename);
|
||||
std::cout << std::endl;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user