diff --git a/src/scrobbler/audioscrobbler.cpp b/src/scrobbler/audioscrobbler.cpp
index affb07c79..8c292b113 100644
--- a/src/scrobbler/audioscrobbler.cpp
+++ b/src/scrobbler/audioscrobbler.cpp
@@ -46,7 +46,9 @@ AudioScrobbler::AudioScrobbler(Application *app, QObject *parent) :
offline_(false),
scrobble_button_(false),
love_button_(false),
- submit_delay_(0)
+ submit_delay_(0),
+ prefer_albumartist_(false),
+ show_auth_error_(false)
{
scrobbler_services_->AddService(new LastFMScrobbler(app_, scrobbler_services_));
@@ -73,6 +75,7 @@ void AudioScrobbler::ReloadSettings() {
love_button_ = s.value("love_button", false).toBool();
submit_delay_ = s.value("submit", 0).toInt();
prefer_albumartist_ = s.value("albumartist", false).toBool();
+ show_auth_error_ = s.value("show_auth_error", true).toBool();
s.endGroup();
emit ScrobblingEnabledChanged(enabled_);
diff --git a/src/scrobbler/audioscrobbler.h b/src/scrobbler/audioscrobbler.h
index f7db04c1c..096609776 100644
--- a/src/scrobbler/audioscrobbler.h
+++ b/src/scrobbler/audioscrobbler.h
@@ -46,6 +46,7 @@ class AudioScrobbler : public QObject {
bool LoveButton() const { return love_button_; }
int SubmitDelay() const { return submit_delay_; }
bool PreferAlbumArtist() const { return prefer_albumartist_; }
+ bool ShowAuthError() const { return show_auth_error_; }
void UpdateNowPlaying(const Song &song);
void ClearPlaying();
@@ -85,6 +86,7 @@ class AudioScrobbler : public QObject {
bool love_button_;
int submit_delay_;
bool prefer_albumartist_;
+ bool show_auth_error_;
};
diff --git a/src/scrobbler/scrobblingapi20.cpp b/src/scrobbler/scrobblingapi20.cpp
index 20944ada5..16bda346b 100644
--- a/src/scrobbler/scrobblingapi20.cpp
+++ b/src/scrobbler/scrobblingapi20.cpp
@@ -525,7 +525,7 @@ void ScrobblingAPI20::Scrobble(const Song &song) {
if (app_->scrobbler()->IsOffline()) return;
if (!IsAuthenticated()) {
- emit ErrorMessage(tr("Scrobbler %1 is not authenticated!").arg(name_));
+ if (app_->scrobbler()->ShowAuthError()) { emit ErrorMessage(tr("Scrobbler %1 is not authenticated!").arg(name_)); }
return;
}
diff --git a/src/settings/scrobblersettingspage.cpp b/src/settings/scrobblersettingspage.cpp
index 56a90cff9..7c2b982f6 100644
--- a/src/settings/scrobblersettingspage.cpp
+++ b/src/settings/scrobblersettingspage.cpp
@@ -94,6 +94,7 @@ void ScrobblerSettingsPage::Load() {
ui_->checkbox_offline->setChecked(scrobbler_->IsOffline());
ui_->spinbox_submit->setValue(scrobbler_->SubmitDelay());
ui_->checkbox_albumartist->setChecked(scrobbler_->PreferAlbumArtist());
+ ui_->checkbox_show_auth_error->setChecked(scrobbler_->ShowAuthError());
ui_->checkbox_lastfm_enable->setChecked(lastfmscrobbler_->IsEnabled());
ui_->checkbox_lastfm_https->setChecked(lastfmscrobbler_->IsUseHTTPS());
@@ -119,6 +120,7 @@ void ScrobblerSettingsPage::Save() {
s.setValue("offline", ui_->checkbox_offline->isChecked());
s.setValue("submit", ui_->spinbox_submit->value());
s.setValue("albumartist", ui_->checkbox_albumartist->isChecked());
+ s.setValue("show_auth_error", ui_->checkbox_show_auth_error->isChecked());
s.endGroup();
s.beginGroup(LastFMScrobbler::kSettingsGroup);
diff --git a/src/settings/scrobblersettingspage.ui b/src/settings/scrobblersettingspage.ui
index 661ce24d5..d6309dd78 100644
--- a/src/settings/scrobblersettingspage.ui
+++ b/src/settings/scrobblersettingspage.ui
@@ -109,6 +109,13 @@
+ -
+
+
+ Show error dialog if scrobbler is enabled without being authenticated
+
+
+
-