diff --git a/include/api.h b/include/api.h index 893f29c..6a084b3 100644 --- a/include/api.h +++ b/include/api.h @@ -85,7 +85,7 @@ class API apiConfig config; userDetails user; - API(const std::string& token,const std::string& secret); + API(const std::string& token,const std::string& secret, const bool& verbose = false); int init(); int login(const std::string& email, const std::string& password); int getAPIConfig(); diff --git a/src/api.cpp b/src/api.cpp index 2399a53..6a0976f 100644 --- a/src/api.cpp +++ b/src/api.cpp @@ -32,10 +32,10 @@ gameFile::~gameFile() } -API::API(const std::string& token, const std::string& secret) +API::API(const std::string& token, const std::string& secret, const bool& verbose) { curlhandle = curl_easy_init(); - curl_easy_setopt(curlhandle, CURLOPT_VERBOSE, 0); + curl_easy_setopt(curlhandle, CURLOPT_VERBOSE, verbose); curl_easy_setopt(curlhandle, CURLOPT_FOLLOWLOCATION, 1); curl_easy_setopt(curlhandle, CURLOPT_NOPROGRESS, 1); curl_easy_setopt(curlhandle, CURLOPT_CONNECTTIMEOUT, 10); diff --git a/src/downloader.cpp b/src/downloader.cpp index 1411052..d1183da 100644 --- a/src/downloader.cpp +++ b/src/downloader.cpp @@ -62,7 +62,7 @@ int Downloader::init() if (config.bVerbose) curl_easy_setopt(curlhandle, CURLOPT_VERBOSE, 1); - gogAPI = new API(config.sToken, config.sSecret); + gogAPI = new API(config.sToken, config.sSecret, config.bVerbose); progressbar = new ProgressBar(!config.bNoUnicode, !config.bNoColor); if (config.bLogin || !gogAPI->init())