correctly distinguish user/pass auth errors from other connectivity errors again
This commit is contained in:
@@ -9,9 +9,13 @@ type SubsonicServer struct {
|
||||
subsonicCli.Client
|
||||
}
|
||||
|
||||
func (s *SubsonicServer) Login(username, password string) error {
|
||||
func (s *SubsonicServer) Login(username, password string) mediaprovider.LoginResponse {
|
||||
s.User = username
|
||||
return s.Client.Authenticate(password)
|
||||
err := s.Client.Authenticate(password)
|
||||
return mediaprovider.LoginResponse{
|
||||
Error: err,
|
||||
IsAuthError: err == subsonicCli.ErrAuthenticationFailure,
|
||||
}
|
||||
}
|
||||
|
||||
func (s *SubsonicServer) MediaProvider() mediaprovider.MediaProvider {
|
||||
|
||||
Reference in New Issue
Block a user