From 47850356b3ad10b12be52795dac73cd11d61a3f7 Mon Sep 17 00:00:00 2001 From: Benjamin Schaaf Date: Sat, 8 Jan 2022 18:06:38 +1100 Subject: [PATCH] Auto-disable salt_auth for ampache --- sublime_music/adapters/subsonic/adapter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sublime_music/adapters/subsonic/adapter.py b/sublime_music/adapters/subsonic/adapter.py index 7ef9601..f10d0b6 100644 --- a/sublime_music/adapters/subsonic/adapter.py +++ b/sublime_music/adapters/subsonic/adapter.py @@ -168,10 +168,11 @@ class SubsonicAdapter(Adapter): "Double check the server address." ) except ServerError as e: - if e.status_code in (10, 41) and config_store["salt_auth"]: + if e.status_code in (10, 40, 41) and config_store["salt_auth"]: # status code 10: if salt auth is not enabled, server will # return error server error with status_code 10 since it'll # interpret it as a missing (password) parameter + # status code 41: returned by ampache # status code 41: as per subsonic api docs, description of # status_code 41 is "Token authentication not supported for # LDAP users." so fall back to password auth