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() {
|
||||
|
||||
QSettings s;
|
||||
|
@ -106,13 +102,9 @@ void SubsonicScrobbler::Scrobble(const Song &song) {
|
|||
|
||||
}
|
||||
|
||||
void SubsonicScrobbler::DoSubmit() {
|
||||
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
if (app_->scrobbler()->IsOffline()) return;
|
||||
|
|
|
@ -40,7 +40,6 @@ class SubsonicScrobbler : public ScrobblerService {
|
|||
|
||||
public:
|
||||
explicit SubsonicScrobbler(Application *app, QObject *parent = nullptr);
|
||||
~SubsonicScrobbler() override;
|
||||
|
||||
static const char *kName;
|
||||
|
||||
|
@ -54,7 +53,7 @@ class SubsonicScrobbler : public ScrobblerService {
|
|||
void Scrobble(const Song &song) override;
|
||||
void Error(const QString &error, const QVariant &debug = QVariant()) override;
|
||||
|
||||
void DoSubmit() override;
|
||||
void DoSubmit() override {}
|
||||
void Submitted() override { submitted_ = true; }
|
||||
bool IsSubmitted() const override { return submitted_; }
|
||||
|
||||
|
|
|
@ -45,9 +45,7 @@ SubsonicScrobbleRequest::SubsonicScrobbleRequest(SubsonicService *service, Subso
|
|||
url_handler_(url_handler),
|
||||
app_(app),
|
||||
scrobble_requests_active_(0)
|
||||
{
|
||||
|
||||
}
|
||||
{}
|
||||
|
||||
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()) {
|
||||
return;
|
||||
|
|
|
@ -81,7 +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);
|
||||
void Scrobble(const QString &song_id, const bool submission, const QDateTime time);
|
||||
|
||||
public slots:
|
||||
void ShowConfig() override;
|
||||
|
|
Loading…
Reference in New Issue