From 901478133699ee2c026a434e9d381450bd32efa4 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Mon, 10 Sep 2018 22:22:00 +0200 Subject: [PATCH] Fix Tidal authentication --- src/tidal/tidalservice.cpp | 3 ++- src/tidal/tidalservice.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tidal/tidalservice.cpp b/src/tidal/tidalservice.cpp index 3923790b1..eef2933d6 100644 --- a/src/tidal/tidalservice.cpp +++ b/src/tidal/tidalservice.cpp @@ -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_); } diff --git a/src/tidal/tidalservice.h b/src/tidal/tidalservice.h index 67625ca9b..f073e1c70 100644 --- a/src/tidal/tidalservice.h +++ b/src/tidal/tidalservice.h @@ -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);