Improve album cover searching and cover manager, use HttpStatusCodeAttribute and QSslError for services
- Improve album cover manager - Change art_automatic and art_manual to QUrl - Refresh collection album covers when new album covers are fetched - Fix automatic album cover searching for local files outside of the collection - Make all Json services check HttpStatusCodeAttribute - Show detailed SSL errors for Subsonic, Tidal and Qobuz
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include <QPair>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QUrl>
|
||||
#include <QNetworkReply>
|
||||
#include <QTimer>
|
||||
@@ -61,7 +62,6 @@ class TidalService : public InternetService {
|
||||
static const Song::Source kSource;
|
||||
|
||||
void ReloadSettings();
|
||||
QString CoverCacheDir();
|
||||
|
||||
void Logout();
|
||||
int Search(const QString &query, InternetSearch::SearchType type);
|
||||
@@ -69,6 +69,8 @@ class TidalService : public InternetService {
|
||||
|
||||
const int max_login_attempts() { return kLoginAttempts; }
|
||||
|
||||
Application *app() { return app_; }
|
||||
|
||||
const bool oauth() { return oauth_; }
|
||||
QString client_id() { return client_id_; }
|
||||
QString api_token() { return api_token_; }
|
||||
@@ -132,6 +134,7 @@ class TidalService : public InternetService {
|
||||
private slots:
|
||||
void StartAuthorisation();
|
||||
void AuthorisationUrlReceived(const QUrl &url);
|
||||
void HandleLoginSSLErrors(QList<QSslError> ssl_errors);
|
||||
void AccessTokenRequestFinished(QNetworkReply *reply);
|
||||
void SendLogin();
|
||||
void HandleAuthReply(QNetworkReply *reply);
|
||||
@@ -160,7 +163,7 @@ class TidalService : public InternetService {
|
||||
typedef QList<EncodedParam> EncodedParamList;
|
||||
|
||||
void SendSearch();
|
||||
QString LoginError(QString error, QVariant debug = QVariant());
|
||||
void LoginError(const QString &error = QString(), const QVariant &debug = QVariant());
|
||||
|
||||
static const char *kApiTokenB64;
|
||||
static const char *kOAuthUrl;
|
||||
@@ -240,6 +243,8 @@ class TidalService : public InternetService {
|
||||
|
||||
QList<TidalStreamURLRequest*> stream_url_requests_;
|
||||
|
||||
QStringList login_errors_;
|
||||
|
||||
};
|
||||
|
||||
#endif // TIDALSERVICE_H
|
||||
|
||||
Reference in New Issue
Block a user