Add version string and number to cached game details

This commit is contained in:
Sude 2015-10-03 19:00:51 +03:00
parent 8736e3dec8
commit ba27e4fbcc
3 changed files with 4 additions and 0 deletions

View File

@ -54,6 +54,7 @@ class Config
std::string sToken; std::string sToken;
std::string sSecret; std::string sSecret;
std::string sVersionString; std::string sVersionString;
std::string sVersionNumber;
std::string sConfigDirectory; std::string sConfigDirectory;
std::string sCookiePath; std::string sCookiePath;
std::string sConfigFilePath; std::string sConfigFilePath;

View File

@ -72,6 +72,7 @@ int main(int argc, char *argv[])
{ {
Config config; Config config;
config.sVersionString = VERSION_STRING; config.sVersionString = VERSION_STRING;
config.sVersionNumber = VERSION_NUMBER;
config.sCacheDirectory = Util::getCacheHome() + "/lgogdownloader"; config.sCacheDirectory = Util::getCacheHome() + "/lgogdownloader";
config.sXMLDirectory = config.sCacheDirectory + "/xml"; config.sXMLDirectory = config.sCacheDirectory + "/xml";

View File

@ -2994,6 +2994,8 @@ int Downloader::saveGameDetailsCache()
Json::Value json; Json::Value json;
json["version-string"] = config.sVersionString;
json["version-number"] = config.sVersionNumber;
json["date"] = bptime::to_iso_string(bptime::second_clock::local_time()); json["date"] = bptime::to_iso_string(bptime::second_clock::local_time());
for (unsigned int i = 0; i < this->games.size(); ++i) for (unsigned int i = 0; i < this->games.size(); ++i)