diff --git a/include/config.h b/include/config.h index fe8e29a..78e6a43 100644 --- a/include/config.h +++ b/include/config.h @@ -218,6 +218,7 @@ class Config bool bShowWishlist; bool bNotifications; bool bIncludeHiddenProducts; + bool bSizeOnly; bool bVerbose; bool bUnicode; // use Unicode in console output diff --git a/main.cpp b/main.cpp index 8117107..f1391f5 100644 --- a/main.cpp +++ b/main.cpp @@ -257,6 +257,7 @@ int main(int argc, char *argv[]) ("lowspeed-timeout", bpo::value(&Globals::globalConfig.curlConf.iLowSpeedTimeout)->default_value(30), "Set time in number seconds that the transfer speed should be below the rate set with --lowspeed-rate for it to considered too slow and aborted") ("lowspeed-rate", bpo::value(&Globals::globalConfig.curlConf.iLowSpeedTimeoutRate)->default_value(200), "Set average transfer speed in bytes per second that the transfer should be below during time specified with --lowspeed-timeout for it to be considered too slow and aborted") ("include-hidden-products", bpo::value(&Globals::globalConfig.bIncludeHiddenProducts)->zero_tokens()->default_value(false), "Include games that have been set hidden in account page") + ("size-only", bpo::value(&Globals::globalConfig.bSizeOnly)->zero_tokens()->default_value(false), "Don't check the hashes of the files whose size matches that on the server") ; options_cli_no_cfg_hidden.add_options() diff --git a/src/downloader.cpp b/src/downloader.cpp index 64d2ec6..959ecaf 100644 --- a/src/downloader.cpp +++ b/src/downloader.cpp @@ -2638,7 +2638,7 @@ void Downloader::processDownloadQueue(Config conf, const unsigned int& tid) if (conf.dlConf.bRemoteXML && !xml_url.empty()) xml = galaxy->getResponse(xml_url); - if (!xml.empty()) + if (!xml.empty() && !Globals::globalConfig.bSizeOnly) { std::string localHash = Util::getLocalFileHash(conf.sXMLDirectory, filepath.string(), gf.gamename); // Do version check if local hash exists