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:
Jonas Kvinge
2019-07-07 21:14:24 +02:00
parent c92a7967ea
commit 65780e1672
101 changed files with 1531 additions and 1239 deletions

View File

@@ -30,6 +30,7 @@
#include <QPair>
#include <QList>
#include <QString>
#include <QStringList>
#include <QUrl>
#include <QNetworkReply>
#include <QTimer>
@@ -59,7 +60,8 @@ class SubsonicService : public InternetService {
static const Song::Source kSource;
void ReloadSettings();
QString CoverCacheDir();
Application *app() { return app_; }
QString client_name() { return kClientName; }
QString api_version() { return kApiVersion; }
@@ -89,6 +91,8 @@ class SubsonicService : public InternetService {
void ResetSongsRequest();
private slots:
//void HandlePingSSLErrors(QNetworkReply *reply, QList<QSslError> ssl_errors);
void HandlePingSSLErrors(QList<QSslError> ssl_errors);
void HandlePingReply(QNetworkReply *reply);
void SongsResultsReceived(const SongList &songs, const QString &error);
@@ -99,7 +103,7 @@ class SubsonicService : public InternetService {
typedef QPair<QByteArray, QByteArray> EncodedParam;
typedef QList<EncodedParam> EncodedParamList;
QString PingError(QString error, QVariant debug = QVariant());
void PingError(const QString &error = QString(), const QVariant &debug = QVariant());
static const char *kClientName;
static const char *kApiVersion;
@@ -122,6 +126,8 @@ class SubsonicService : public InternetService {
bool verify_certificate_;
bool download_album_covers_;
QStringList errors_;
};
#endif // SUBSONICSERVICE_H