mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2024-11-20 11:49:17 +01:00
Fix login bug
This commit is contained in:
parent
4584b81a4b
commit
359df14b4a
@ -43,7 +43,6 @@ API::API(const std::string& token, const std::string& secret)
|
|||||||
curl_easy_setopt(curlhandle, CURLOPT_FAILONERROR, true);
|
curl_easy_setopt(curlhandle, CURLOPT_FAILONERROR, true);
|
||||||
|
|
||||||
this->error = false;
|
this->error = false;
|
||||||
this->getAPIConfig();
|
|
||||||
this->config.oauth_token = token;
|
this->config.oauth_token = token;
|
||||||
this->config.oauth_secret = secret;
|
this->config.oauth_secret = secret;
|
||||||
}
|
}
|
||||||
@ -51,6 +50,7 @@ API::API(const std::string& token, const std::string& secret)
|
|||||||
int API::init()
|
int API::init()
|
||||||
{
|
{
|
||||||
int res = 0;
|
int res = 0;
|
||||||
|
this->getAPIConfig();
|
||||||
|
|
||||||
// Check if we already have token and secret
|
// Check if we already have token and secret
|
||||||
if (!this->config.oauth_token.empty() && !this->config.oauth_secret.empty())
|
if (!this->config.oauth_token.empty() && !this->config.oauth_secret.empty())
|
||||||
|
@ -71,7 +71,8 @@ int Downloader::init()
|
|||||||
|
|
||||||
progressbar = new ProgressBar(!config.bNoUnicode, !config.bNoColor);
|
progressbar = new ProgressBar(!config.bNoUnicode, !config.bNoColor);
|
||||||
|
|
||||||
if (config.bLogin || !gogAPI->init())
|
bool bInitOK = gogAPI->init();
|
||||||
|
if (config.bLogin || !bInitOK)
|
||||||
return this->login();
|
return this->login();
|
||||||
|
|
||||||
if (!config.bNoCover && config.bDownload && !config.bUpdateCheck)
|
if (!config.bNoCover && config.bDownload && !config.bUpdateCheck)
|
||||||
|
Loading…
Reference in New Issue
Block a user