Added --cover-list option to set url for cover list

This commit is contained in:
Sude 2014-08-28 16:00:24 +03:00
parent 3e12ddafb3
commit cd2d1f22f8
3 changed files with 3 additions and 1 deletions

View File

@ -52,6 +52,7 @@ class Config
std::string sConfigFilePath; std::string sConfigFilePath;
std::string sBlacklistFilePath; std::string sBlacklistFilePath;
std::string sOrphanRegex; std::string sOrphanRegex;
std::string sCoverList;
unsigned int iInstallerType; unsigned int iInstallerType;
unsigned int iInstallerLanguage; unsigned int iInstallerLanguage;
int iRetries; int iRetries;

View File

@ -163,6 +163,7 @@ int main(int argc, char *argv[])
("timeout", bpo::value<long int>(&config.iTimeout)->default_value(10), "Set timeout for connection\nMaximum time in seconds that connection phase is allowed to take") ("timeout", bpo::value<long int>(&config.iTimeout)->default_value(10), "Set timeout for connection\nMaximum time in seconds that connection phase is allowed to take")
("retries", bpo::value<int>(&config.iRetries)->default_value(3), "Set maximum number of retries on failed download") ("retries", bpo::value<int>(&config.iRetries)->default_value(3), "Set maximum number of retries on failed download")
("wait", bpo::value<int>(&config.iWait)->default_value(0), "Time to wait between requests (milliseconds)") ("wait", bpo::value<int>(&config.iWait)->default_value(0), "Time to wait between requests (milliseconds)")
("cover-list", bpo::value<std::string>(&config.sCoverList)->default_value("https://sites.google.com/site/gogdownloader/covers.xml"), "Set URL for cover list")
; ;
// Options read from config file // Options read from config file
options_cfg_only.add_options() options_cfg_only.add_options()

View File

@ -83,7 +83,7 @@ int Downloader::init()
return 1; return 1;
if (config.bCover && config.bDownload && !config.bUpdateCheck) 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 if (!config.bUpdateCheck) // updateCheck() calls getGameList() if needed
this->getGameList(); this->getGameList();