Fix minor code issues
This commit is contained in:
parent
d94ee8863c
commit
09cdba4b3d
|
@ -52,10 +52,6 @@ SubsonicScrobbler::SubsonicScrobbler(Application *app, QObject *parent) : Scrobb
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SubsonicScrobbler::~SubsonicScrobbler() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void SubsonicScrobbler::ReloadSettings() {
|
void SubsonicScrobbler::ReloadSettings() {
|
||||||
|
|
||||||
QSettings s;
|
QSettings s;
|
||||||
|
@ -106,13 +102,9 @@ void SubsonicScrobbler::Scrobble(const Song &song) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SubsonicScrobbler::DoSubmit() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void SubsonicScrobbler::Submit() {
|
void SubsonicScrobbler::Submit() {
|
||||||
|
|
||||||
qLog(Debug) << "SubsonicScrobbler: Submitting scrobble for " << song_playing_.song_id();
|
qLog(Debug) << "SubsonicScrobbler: Submitting scrobble for" << song_playing_.artist() << song_playing_.title();
|
||||||
submitted_ = false;
|
submitted_ = false;
|
||||||
|
|
||||||
if (app_->scrobbler()->IsOffline()) return;
|
if (app_->scrobbler()->IsOffline()) return;
|
||||||
|
|
|
@ -40,7 +40,6 @@ class SubsonicScrobbler : public ScrobblerService {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit SubsonicScrobbler(Application *app, QObject *parent = nullptr);
|
explicit SubsonicScrobbler(Application *app, QObject *parent = nullptr);
|
||||||
~SubsonicScrobbler() override;
|
|
||||||
|
|
||||||
static const char *kName;
|
static const char *kName;
|
||||||
|
|
||||||
|
@ -54,7 +53,7 @@ class SubsonicScrobbler : public ScrobblerService {
|
||||||
void Scrobble(const Song &song) override;
|
void Scrobble(const Song &song) override;
|
||||||
void Error(const QString &error, const QVariant &debug = QVariant()) override;
|
void Error(const QString &error, const QVariant &debug = QVariant()) override;
|
||||||
|
|
||||||
void DoSubmit() override;
|
void DoSubmit() override {}
|
||||||
void Submitted() override { submitted_ = true; }
|
void Submitted() override { submitted_ = true; }
|
||||||
bool IsSubmitted() const override { return submitted_; }
|
bool IsSubmitted() const override { return submitted_; }
|
||||||
|
|
||||||
|
|
|
@ -45,9 +45,7 @@ SubsonicScrobbleRequest::SubsonicScrobbleRequest(SubsonicService *service, Subso
|
||||||
url_handler_(url_handler),
|
url_handler_(url_handler),
|
||||||
app_(app),
|
app_(app),
|
||||||
scrobble_requests_active_(0)
|
scrobble_requests_active_(0)
|
||||||
{
|
{}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
SubsonicScrobbleRequest::~SubsonicScrobbleRequest() {
|
SubsonicScrobbleRequest::~SubsonicScrobbleRequest() {
|
||||||
|
|
||||||
|
|
|
@ -381,7 +381,7 @@ void SubsonicService::CheckConfiguration() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SubsonicService::Scrobble(QString song_id, bool submission, QDateTime time) {
|
void SubsonicService::Scrobble(const QString &song_id, const bool submission, const QDateTime time) {
|
||||||
|
|
||||||
if (!server_url().isValid() || username().isEmpty() || password().isEmpty()) {
|
if (!server_url().isValid() || username().isEmpty() || password().isEmpty()) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -81,7 +81,7 @@ class SubsonicService : public InternetService {
|
||||||
QSortFilterProxyModel *songs_collection_sort_model() override { return collection_sort_model_; }
|
QSortFilterProxyModel *songs_collection_sort_model() override { return collection_sort_model_; }
|
||||||
|
|
||||||
void CheckConfiguration();
|
void CheckConfiguration();
|
||||||
void Scrobble(QString song_id, bool submission, QDateTime time);
|
void Scrobble(const QString &song_id, const bool submission, const QDateTime time);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void ShowConfig() override;
|
void ShowConfig() override;
|
||||||
|
|
Loading…
Reference in New Issue