mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2025-02-01 21:42:31 +01:00
Use the new "#name" variable in the API for installers
This commit is contained in:
parent
6aa24207c3
commit
5ad708e5b6
@ -323,7 +323,7 @@ gameDetails API::getGameDetails(const std::string& game_name, const unsigned int
|
||||
game.installers.push_back(
|
||||
gameFile( installer["#updated"].isBool() ? installer["#updated"].asBool() : false,
|
||||
installer["id"].isInt() ? std::to_string(installer["id"].asInt()) : installer["id"].asString(),
|
||||
std::string(), // empty string because installer doesn't have "name"
|
||||
installer["#name"].asString(),
|
||||
installer["link"].asString(),
|
||||
installer["size"].asString()
|
||||
)
|
||||
|
@ -276,6 +276,7 @@ void Downloader::listGames()
|
||||
if (!config.bUpdateCheck || games[i].installers[j].updated) // Always list updated files
|
||||
{
|
||||
std::cout << "\tid: " << games[i].installers[j].id << std::endl
|
||||
<< "\tname: " << games[i].installers[j].name << std::endl
|
||||
<< "\tpath: " << games[i].installers[j].path << std::endl
|
||||
<< "\tsize: " << games[i].installers[j].size << std::endl
|
||||
<< "\tupdated: " << (games[i].installers[j].updated ? "True" : "False") << std::endl
|
||||
@ -433,6 +434,8 @@ void Downloader::download()
|
||||
// Download
|
||||
if (!url.empty())
|
||||
{
|
||||
if (!games[i].installers[j].name.empty())
|
||||
std::cout << "Dowloading: " << games[i].installers[j].name << std::endl;
|
||||
std::cout << filepath << std::endl;
|
||||
this->downloadFile(url, filepath);
|
||||
std::cout << std::endl;
|
||||
|
Loading…
x
Reference in New Issue
Block a user