Fix Tidal authentication
This commit is contained in:
parent
e479e7e113
commit
9014781336
|
@ -70,6 +70,7 @@ TidalService::TidalService(Application *app, InternetModel *parent)
|
|||
albumssearchlimit_(1),
|
||||
songssearchlimit_(1),
|
||||
fetchalbums_(false),
|
||||
user_id_(0),
|
||||
pending_search_id_(0),
|
||||
next_pending_search_id_(1),
|
||||
login_sent_(false)
|
||||
|
@ -440,7 +441,7 @@ void TidalService::StartSearch() {
|
|||
search_text_ = pending_search_text_;
|
||||
|
||||
if (authenticated()) SendSearch();
|
||||
else Login(username_, password_);
|
||||
else emit Login(username_, password_, search_id_);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ class TidalService : public InternetService {
|
|||
void CancelSearch();
|
||||
|
||||
const bool login_sent() { return login_sent_; }
|
||||
const bool authenticated() { return (!session_id_.isEmpty() && !country_code_.isEmpty()); }
|
||||
const bool authenticated() { return (!session_id_.isEmpty() && !user_id_ == 0 && !country_code_.isEmpty()); }
|
||||
|
||||
signals:
|
||||
void Login(const int search_id = 0);
|
||||
|
|
Loading…
Reference in New Issue