mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2025-02-08 16:33:22 +01:00
Show installer and patch version when listing game details
This commit is contained in:
parent
26315b23b8
commit
fe7fad300b
@ -32,6 +32,7 @@ class gameFile
|
|||||||
std::string path;
|
std::string path;
|
||||||
std::string size;
|
std::string size;
|
||||||
std::string galaxy_downlink_json_url;
|
std::string galaxy_downlink_json_url;
|
||||||
|
std::string version;
|
||||||
unsigned int platform;
|
unsigned int platform;
|
||||||
unsigned int language;
|
unsigned int language;
|
||||||
unsigned int type;
|
unsigned int type;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
namespace GlobalConstants
|
namespace GlobalConstants
|
||||||
{
|
{
|
||||||
const int GAMEDETAILS_CACHE_VERSION = 3;
|
const int GAMEDETAILS_CACHE_VERSION = 4;
|
||||||
const int ZLIB_WINDOW_SIZE = 15;
|
const int ZLIB_WINDOW_SIZE = 15;
|
||||||
|
|
||||||
struct optionsStruct {const unsigned int id; const std::string code; const std::string str; const std::string regexp;};
|
struct optionsStruct {const unsigned int id; const std::string code; const std::string str; const std::string regexp;};
|
||||||
|
@ -510,6 +510,7 @@ int Downloader::listGames()
|
|||||||
<< "\tsize: " << games[i].installers[j].size << std::endl
|
<< "\tsize: " << games[i].installers[j].size << std::endl
|
||||||
<< "\tupdated: " << (games[i].installers[j].updated ? "True" : "False") << std::endl
|
<< "\tupdated: " << (games[i].installers[j].updated ? "True" : "False") << std::endl
|
||||||
<< "\tlanguage: " << languages << std::endl
|
<< "\tlanguage: " << languages << std::endl
|
||||||
|
<< "\tversion: " << games[i].installers[j].version << std::endl
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -556,6 +557,7 @@ int Downloader::listGames()
|
|||||||
<< "\tsize: " << games[i].patches[j].size << std::endl
|
<< "\tsize: " << games[i].patches[j].size << std::endl
|
||||||
<< "\tupdated: " << (games[i].patches[j].updated ? "True" : "False") << std::endl
|
<< "\tupdated: " << (games[i].patches[j].updated ? "True" : "False") << std::endl
|
||||||
<< "\tlanguage: " << languages << std::endl
|
<< "\tlanguage: " << languages << std::endl
|
||||||
|
<< "\tversion: " << games[i].patches[j].version << std::endl
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -608,6 +610,7 @@ int Downloader::listGames()
|
|||||||
<< "\tpath: " << games[i].dlcs[j].installers[k].path << std::endl
|
<< "\tpath: " << games[i].dlcs[j].installers[k].path << std::endl
|
||||||
<< "\tsize: " << games[i].dlcs[j].installers[k].size << std::endl
|
<< "\tsize: " << games[i].dlcs[j].installers[k].size << std::endl
|
||||||
<< "\tupdated: " << (games[i].dlcs[j].installers[k].updated ? "True" : "False") << std::endl
|
<< "\tupdated: " << (games[i].dlcs[j].installers[k].updated ? "True" : "False") << std::endl
|
||||||
|
<< "\tversion: " << games[i].dlcs[j].installers[k].version << std::endl
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
for (unsigned int k = 0; k < games[i].dlcs[j].patches.size(); ++k)
|
for (unsigned int k = 0; k < games[i].dlcs[j].patches.size(); ++k)
|
||||||
@ -625,6 +628,7 @@ int Downloader::listGames()
|
|||||||
<< "\tname: " << games[i].dlcs[j].patches[k].name << std::endl
|
<< "\tname: " << games[i].dlcs[j].patches[k].name << std::endl
|
||||||
<< "\tpath: " << games[i].dlcs[j].patches[k].path << std::endl
|
<< "\tpath: " << games[i].dlcs[j].patches[k].path << std::endl
|
||||||
<< "\tsize: " << games[i].dlcs[j].patches[k].size << std::endl
|
<< "\tsize: " << games[i].dlcs[j].patches[k].size << std::endl
|
||||||
|
<< "\tversion: " << games[i].dlcs[j].patches[k].version << std::endl
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
for (unsigned int k = 0; k < games[i].dlcs[j].extras.size(); ++k)
|
for (unsigned int k = 0; k < games[i].dlcs[j].extras.size(); ++k)
|
||||||
@ -2162,6 +2166,8 @@ std::vector<gameDetails> Downloader::getGameDetailsFromJsonNode(Json::Value root
|
|||||||
fileDetails.gamename = fileDetailsNode["gamename"].asString();
|
fileDetails.gamename = fileDetailsNode["gamename"].asString();
|
||||||
fileDetails.type = fileDetailsNode["type"].asUInt();
|
fileDetails.type = fileDetailsNode["type"].asUInt();
|
||||||
fileDetails.galaxy_downlink_json_url = fileDetailsNode["galaxy_downlink_json_url"].asString();
|
fileDetails.galaxy_downlink_json_url = fileDetailsNode["galaxy_downlink_json_url"].asString();
|
||||||
|
if (!fileDetailsNode["version"].empty())
|
||||||
|
fileDetails.version = fileDetailsNode["version"].asString();
|
||||||
|
|
||||||
if (nodeName != "extras" && !(fileDetails.platform & conf.dlConf.iInstallerPlatform))
|
if (nodeName != "extras" && !(fileDetails.platform & conf.dlConf.iInstallerPlatform))
|
||||||
continue;
|
continue;
|
||||||
|
@ -332,6 +332,9 @@ std::vector<gameFile> galaxyAPI::fileJsonNodeToGameFileVector(const std::string&
|
|||||||
Json::Value infoNode = json[i];
|
Json::Value infoNode = json[i];
|
||||||
unsigned int iFiles = infoNode["files"].size();
|
unsigned int iFiles = infoNode["files"].size();
|
||||||
std::string name = infoNode["name"].asString();
|
std::string name = infoNode["name"].asString();
|
||||||
|
std::string version = "";
|
||||||
|
if (!infoNode["version"].empty())
|
||||||
|
version = infoNode["version"].asString();
|
||||||
|
|
||||||
unsigned int iPlatform = GlobalConstants::PLATFORM_WINDOWS;
|
unsigned int iPlatform = GlobalConstants::PLATFORM_WINDOWS;
|
||||||
unsigned int iLanguage = GlobalConstants::LANGUAGE_EN;
|
unsigned int iLanguage = GlobalConstants::LANGUAGE_EN;
|
||||||
@ -368,6 +371,7 @@ std::vector<gameFile> galaxyAPI::fileJsonNodeToGameFileVector(const std::string&
|
|||||||
gf.size = Util::getJsonUIntValueAsString(fileNode["size"]);
|
gf.size = Util::getJsonUIntValueAsString(fileNode["size"]);
|
||||||
gf.updated = 0; // assume not updated
|
gf.updated = 0; // assume not updated
|
||||||
gf.galaxy_downlink_json_url = downlink;
|
gf.galaxy_downlink_json_url = downlink;
|
||||||
|
gf.version = version;
|
||||||
|
|
||||||
if (!(type & GFTYPE_EXTRA))
|
if (!(type & GFTYPE_EXTRA))
|
||||||
{
|
{
|
||||||
|
@ -12,6 +12,7 @@ gameFile::gameFile()
|
|||||||
this->language = GlobalConstants::LANGUAGE_EN;
|
this->language = GlobalConstants::LANGUAGE_EN;
|
||||||
this->silent = 0;
|
this->silent = 0;
|
||||||
this->type = 0;
|
this->type = 0;
|
||||||
|
this->version = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
gameFile::~gameFile()
|
gameFile::~gameFile()
|
||||||
@ -44,6 +45,8 @@ Json::Value gameFile::getAsJson()
|
|||||||
json["gamename"] = this->gamename;
|
json["gamename"] = this->gamename;
|
||||||
json["type"] = this->type;
|
json["type"] = this->type;
|
||||||
json["galaxy_downlink_json_url"] = this->galaxy_downlink_json_url;
|
json["galaxy_downlink_json_url"] = this->galaxy_downlink_json_url;
|
||||||
|
if (!this->version.empty())
|
||||||
|
json["version"] = this->version;
|
||||||
|
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user