Fix AcoustID test connection falsely failing for valid API keys
The fallback test (used when no audio files exist in the library) sends a dummy fingerprint to the AcoustID API. The API correctly rejects the dummy fingerprint but this is not error code 4 (invalid key), so the test was returning False instead of True. Any non-code-4 error from the fallback means the API key was accepted — only code 4 means a bad key.
This commit is contained in:
parent
e1c8620928
commit
352ad5ff68
2 changed files with 4 additions and 1 deletions
|
|
@ -329,7 +329,9 @@ class AcoustIDClient:
|
|||
# Error code 4 is specifically "invalid API key"
|
||||
if error_code == 4:
|
||||
return False, "Invalid AcoustID API key - get one from https://acoustid.org/new-application"
|
||||
return False, f"AcoustID API error: {error_msg}"
|
||||
# Any other error (e.g. "invalid fingerprint") means the API key
|
||||
# was accepted — the dummy test fingerprint is just rejected as expected
|
||||
return True, "AcoustID API key is valid"
|
||||
|
||||
# Status is 'ok' - key is valid
|
||||
return True, "AcoustID API key is valid"
|
||||
|
|
|
|||
|
|
@ -21601,6 +21601,7 @@ def get_version_info():
|
|||
"• Docker compose includes optional slskd service block",
|
||||
"• Multi-stage Docker build reduces image size",
|
||||
"• MusicBrainz recording ID backfilled from Navidrome during scan",
|
||||
"• AcoustID test connection no longer reports failure for valid API keys when library is empty",
|
||||
],
|
||||
},
|
||||
# v2.2 and earlier features moved to archive
|
||||
|
|
|
|||
Loading…
Reference in a new issue