Refactor Tidal, Spotify, Qobuz, Subsonic and cover providers
Use common HTTP, Json and OAuthenticator class
This commit is contained in:
@@ -59,6 +59,8 @@ class StreamingService : public QObject {
|
||||
virtual bool authenticated() const { return false; }
|
||||
virtual int Search(const QString &query, const SearchType type) { Q_UNUSED(query); Q_UNUSED(type); return 0; }
|
||||
virtual void CancelSearch() {}
|
||||
virtual bool show_progress() const { return true; }
|
||||
virtual bool enable_refresh_button() const { return true; }
|
||||
|
||||
virtual SharedPtr<CollectionBackend> artists_collection_backend() { return nullptr; }
|
||||
virtual SharedPtr<CollectionBackend> albums_collection_backend() { return nullptr; }
|
||||
@@ -87,14 +89,14 @@ class StreamingService : public QObject {
|
||||
void RequestLogout();
|
||||
void LoginWithCredentials(const QString &api_token, const QString &username, const QString &password);
|
||||
void LoginSuccess();
|
||||
void LoginFailure(const QString &failure_reason);
|
||||
void LoginComplete(const bool success, const QString &error = QString());
|
||||
void LoginFailure(const QString &error);
|
||||
void LoginFinished(const bool success, const QString &error = QString());
|
||||
|
||||
void TestSuccess();
|
||||
void TestFailure(const QString &failure_reason);
|
||||
void TestFailure(const QString &error);
|
||||
void TestComplete(const bool success, const QString &error = QString());
|
||||
|
||||
void Error(const QString &error);
|
||||
void ShowErrorDialog(const QString &error);
|
||||
void Results(const SongMap &songs, const QString &error);
|
||||
void UpdateStatus(const QString &text);
|
||||
void ProgressSetMaximum(const int max);
|
||||
@@ -131,6 +133,7 @@ class StreamingService : public QObject {
|
||||
|
||||
void StreamURLFailure(const uint id, const QUrl &media_url, const QString &error);
|
||||
void StreamURLSuccess(const uint id, const QUrl &media_url, const QUrl &stream_url, const Song::FileType filetype, const int samplerate, const int bit_depth, const qint64 duration);
|
||||
void StreamURLRequestFinished(const uint id, const QUrl &media_url, const bool success, const QUrl &stream_url, const QString &error = QString());
|
||||
|
||||
void OpenSettingsDialog(const Song::Source source);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user