SpotifyCoverProvider: Fix trying to set timer to minus value
This commit is contained in:
@@ -80,7 +80,7 @@ SpotifyCoverProvider::SpotifyCoverProvider(Application *app, NetworkAccessManage
|
|||||||
s.endGroup();
|
s.endGroup();
|
||||||
|
|
||||||
if (!refresh_token_.isEmpty()) {
|
if (!refresh_token_.isEmpty()) {
|
||||||
quint64 time = expires_in_ - (QDateTime::currentDateTime().toSecsSinceEpoch() - login_time_);
|
qint64 time = expires_in_ - (QDateTime::currentDateTime().toSecsSinceEpoch() - login_time_);
|
||||||
if (time < 1) time = 1;
|
if (time < 1) time = 1;
|
||||||
refresh_login_timer_.setInterval(static_cast<int>(time * kMsecPerSec));
|
refresh_login_timer_.setInterval(static_cast<int>(time * kMsecPerSec));
|
||||||
refresh_login_timer_.start();
|
refresh_login_timer_.start();
|
||||||
|
|||||||
Reference in New Issue
Block a user