Fix DBus name mismatch

Fixed issue where the Flatpak couldn't respond to media keys due to a DBusname mismatch.
This commit is contained in:
Sumner Evans
2020-09-30 14:35:39 -06:00
parent 8c040723b0
commit 08ac114cd2
3 changed files with 14 additions and 6 deletions

View File

@@ -171,13 +171,13 @@ 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, 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
# return error server error with status_code 10 since it'll
# interpret it as a missing (password) parameter
# 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
# status_code 41 is "Token authentication not supported for
# LDAP users." so fall back to password auth
try:
config_store["salt_auth"] = False
tmp_adapter = SubsonicAdapter(