From 4aad44cb6211cc33d6287d23040a51706be2796e Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sat, 13 Oct 2018 00:30:52 +0200 Subject: [PATCH] Create timer for login attempts for Tidal --- src/tidal/tidalservice.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tidal/tidalservice.h b/src/tidal/tidalservice.h index c4cc33ab4..cd0097c1a 100644 --- a/src/tidal/tidalservice.h +++ b/src/tidal/tidalservice.h @@ -50,7 +50,6 @@ class TidalService : public InternetService { ~TidalService(); static const Song::Source kSource; - static const int kLoginAttempts; void ReloadSettings(); @@ -83,6 +82,7 @@ class TidalService : public InternetService { private slots: void SendLogin(); void HandleAuthReply(QNetworkReply *reply); + void ResetLoginAttempts(); void StartSearch(); void SearchFinished(QNetworkReply *reply, int search_id); void GetAlbumFinished(QNetworkReply *reply, int search_id, int album_id); @@ -104,10 +104,13 @@ class TidalService : public InternetService { static const char *kAuthUrl; static const char *kResourcesUrl; static const char *kApiTokenB64; + static const int kLoginAttempts; + static const int kTimeResetLoginAttempts; NetworkAccessManager *network_; TidalUrlHandler *url_handler_; QTimer *timer_searchdelay_; + QTimer *timer_login_attempt_; QString username_; QString password_;