From cd2d1f22f867503e697caba1622e106f6262a769 Mon Sep 17 00:00:00 2001 From: Sude Date: Thu, 28 Aug 2014 16:00:24 +0300 Subject: [PATCH] Added --cover-list option to set url for cover list --- include/config.h | 1 + main.cpp | 1 + src/downloader.cpp | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/config.h b/include/config.h index 8972c41..fcfc501 100644 --- a/include/config.h +++ b/include/config.h @@ -52,6 +52,7 @@ class Config std::string sConfigFilePath; std::string sBlacklistFilePath; std::string sOrphanRegex; + std::string sCoverList; unsigned int iInstallerType; unsigned int iInstallerLanguage; int iRetries; diff --git a/main.cpp b/main.cpp index 66ead22..dc27943 100644 --- a/main.cpp +++ b/main.cpp @@ -163,6 +163,7 @@ int main(int argc, char *argv[]) ("timeout", bpo::value(&config.iTimeout)->default_value(10), "Set timeout for connection\nMaximum time in seconds that connection phase is allowed to take") ("retries", bpo::value(&config.iRetries)->default_value(3), "Set maximum number of retries on failed download") ("wait", bpo::value(&config.iWait)->default_value(0), "Time to wait between requests (milliseconds)") + ("cover-list", bpo::value(&config.sCoverList)->default_value("https://sites.google.com/site/gogdownloader/covers.xml"), "Set URL for cover list") ; // Options read from config file options_cfg_only.add_options() diff --git a/src/downloader.cpp b/src/downloader.cpp index 57c605e..5a054ec 100644 --- a/src/downloader.cpp +++ b/src/downloader.cpp @@ -83,7 +83,7 @@ int Downloader::init() return 1; if (config.bCover && config.bDownload && !config.bUpdateCheck) - coverXML = this->getResponse("https://sites.google.com/site/gogdownloader/covers.xml"); + coverXML = this->getResponse(config.sCoverList); if (!config.bUpdateCheck) // updateCheck() calls getGameList() if needed this->getGameList();