Refactor subsonic, tidal and qobuz code

This commit is contained in:
Jonas Kvinge
2021-07-01 02:01:38 +02:00
parent b9f3f80d50
commit b5f4df0912
31 changed files with 183 additions and 203 deletions

View File

@@ -40,7 +40,7 @@ class QobuzStreamURLRequest : public QobuzBaseRequest {
Q_OBJECT
public:
explicit QobuzStreamURLRequest(QobuzService *service, NetworkAccessManager *network, const QUrl &original_url, QObject *parent);
explicit QobuzStreamURLRequest(QobuzService *service, NetworkAccessManager *network, const QUrl &original_url, const int id, QObject *parent = nullptr);
~QobuzStreamURLRequest();
void GetStreamURL();
@@ -54,7 +54,7 @@ class QobuzStreamURLRequest : public QobuzBaseRequest {
signals:
void TryLogin();
void StreamURLFinished(QUrl original_url, QUrl stream_url, Song::FileType filetype, int samplerate, int bit_depth, qint64 duration, QString error = QString());
void StreamURLFinished(int id, QUrl original_url, QUrl stream_url, Song::FileType filetype, int samplerate, int bit_depth, qint64 duration, QString error = QString());
private slots:
void StreamURLReceived();
@@ -68,6 +68,7 @@ class QobuzStreamURLRequest : public QobuzBaseRequest {
QobuzService *service_;
QNetworkReply *reply_;
QUrl original_url_;
int id_;
int song_id_;
int tries_;
bool need_login_;