Fix to prevent spinning status wheel if incomplete Subsonic credentials are supplied

Fixes issue #3733
This commit is contained in:
Ross Wolfson 2013-06-10 21:57:57 -04:00 committed by John Maguire
parent 2e614a3d60
commit a8117c31f0
3 changed files with 8 additions and 0 deletions

View File

@ -173,6 +173,9 @@ void SubsonicService::Login() {
if (IsConfigured()) {
// Ping is enough to check credentials
Ping();
} else {
login_state_ = LoginState_IncompleteCredentials;
emit LoginStateChanged(login_state_);
}
}

View File

@ -37,6 +37,7 @@ class SubsonicService : public InternetService
LoginState_HostNotFound,
LoginState_Timeout,
LoginState_SslError,
LoginState_IncompleteCredentials,
};
enum ApiError {

View File

@ -123,6 +123,10 @@ void SubsonicSettingsPage::LoginStateChanged(SubsonicService::LoginState newstat
"SSLv3 option below may workaround some issues."));
break;
case SubsonicService::LoginState_IncompleteCredentials:
ui_->login_state->SetAccountTypeText(tr("Incomplete configuration, please ensure all fields are populated."));
break;
default:
break;
}