mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2024-11-20 11:49:17 +01:00
--verbose now also sets curlhandle in API to verbose
This commit is contained in:
parent
57415af1c1
commit
6aa24207c3
@ -85,7 +85,7 @@ class API
|
|||||||
apiConfig config;
|
apiConfig config;
|
||||||
userDetails user;
|
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 init();
|
||||||
int login(const std::string& email, const std::string& password);
|
int login(const std::string& email, const std::string& password);
|
||||||
int getAPIConfig();
|
int getAPIConfig();
|
||||||
|
@ -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();
|
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_FOLLOWLOCATION, 1);
|
||||||
curl_easy_setopt(curlhandle, CURLOPT_NOPROGRESS, 1);
|
curl_easy_setopt(curlhandle, CURLOPT_NOPROGRESS, 1);
|
||||||
curl_easy_setopt(curlhandle, CURLOPT_CONNECTTIMEOUT, 10);
|
curl_easy_setopt(curlhandle, CURLOPT_CONNECTTIMEOUT, 10);
|
||||||
|
@ -62,7 +62,7 @@ int Downloader::init()
|
|||||||
if (config.bVerbose)
|
if (config.bVerbose)
|
||||||
curl_easy_setopt(curlhandle, CURLOPT_VERBOSE, 1);
|
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);
|
progressbar = new ProgressBar(!config.bNoUnicode, !config.bNoColor);
|
||||||
|
|
||||||
if (config.bLogin || !gogAPI->init())
|
if (config.bLogin || !gogAPI->init())
|
||||||
|
Loading…
Reference in New Issue
Block a user