Add Subsonic scrobble support (#545)
* add SubsonicScrobbler, add Scrobble method in SubsonicService * new class SubsonicScrobbleRequest, use queue again, clean up * add checkbox to enable server-side scrobbling to Subsonic settings page * Check serversidescrobbling in SubsonicScrobbler::ReloadSettings instead of SubsonicService TODO: SubsonicScrobbler::ReloadSettings needs to be called when SubsonicSettings change.
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include <QUrl>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QSslError>
|
||||
#include <QDateTime>
|
||||
|
||||
#include "core/song.h"
|
||||
#include "internet/internetservice.h"
|
||||
@@ -45,6 +46,7 @@ class QNetworkReply;
|
||||
class Application;
|
||||
class SubsonicUrlHandler;
|
||||
class SubsonicRequest;
|
||||
class SubsonicScrobbleRequest;
|
||||
class CollectionBackend;
|
||||
class CollectionModel;
|
||||
|
||||
@@ -79,6 +81,7 @@ class SubsonicService : public InternetService {
|
||||
QSortFilterProxyModel *songs_collection_sort_model() override { return collection_sort_model_; }
|
||||
|
||||
void CheckConfiguration();
|
||||
void Scrobble(QString song_id, bool submission, QDateTime time);
|
||||
|
||||
public slots:
|
||||
void ShowConfig() override;
|
||||
@@ -116,6 +119,7 @@ class SubsonicService : public InternetService {
|
||||
QSortFilterProxyModel *collection_sort_model_;
|
||||
|
||||
std::shared_ptr<SubsonicRequest> songs_request_;
|
||||
std::shared_ptr<SubsonicScrobbleRequest> scrobble_request_;
|
||||
|
||||
QUrl server_url_;
|
||||
QString username_;
|
||||
|
||||
Reference in New Issue
Block a user