From ba27e4fbcccfca170cea5a8dba6fbc017067ca71 Mon Sep 17 00:00:00 2001 From: Sude Date: Sat, 3 Oct 2015 19:00:51 +0300 Subject: [PATCH] Add version string and number to cached game details --- include/config.h | 1 + main.cpp | 1 + src/downloader.cpp | 2 ++ 3 files changed, 4 insertions(+) diff --git a/include/config.h b/include/config.h index 4f07fbc..9c678ec 100644 --- a/include/config.h +++ b/include/config.h @@ -54,6 +54,7 @@ class Config std::string sToken; std::string sSecret; std::string sVersionString; + std::string sVersionNumber; std::string sConfigDirectory; std::string sCookiePath; std::string sConfigFilePath; diff --git a/main.cpp b/main.cpp index 6b2f0d3..ba4b8c5 100644 --- a/main.cpp +++ b/main.cpp @@ -72,6 +72,7 @@ int main(int argc, char *argv[]) { Config config; config.sVersionString = VERSION_STRING; + config.sVersionNumber = VERSION_NUMBER; config.sCacheDirectory = Util::getCacheHome() + "/lgogdownloader"; config.sXMLDirectory = config.sCacheDirectory + "/xml"; diff --git a/src/downloader.cpp b/src/downloader.cpp index bf53509..0c49a19 100644 --- a/src/downloader.cpp +++ b/src/downloader.cpp @@ -2994,6 +2994,8 @@ int Downloader::saveGameDetailsCache() Json::Value json; + json["version-string"] = config.sVersionString; + json["version-number"] = config.sVersionNumber; json["date"] = bptime::to_iso_string(bptime::second_clock::local_time()); for (unsigned int i = 0; i < this->games.size(); ++i)