Fix musicbrainz test button
This commit is contained in:
parent
bbeec87f39
commit
3ae0ac9d55
2 changed files with 11 additions and 0 deletions
|
|
@ -379,6 +379,16 @@ def run_service_test(service, test_config):
|
||||||
return False, "Hydrabase not connected. Configure URL + API key and click Connect."
|
return False, "Hydrabase not connected. Configure URL + API key and click Connect."
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return False, f"Hydrabase connection error: {str(e)}"
|
return False, f"Hydrabase connection error: {str(e)}"
|
||||||
|
elif service == "musicbrainz":
|
||||||
|
try:
|
||||||
|
from core.metadata.registry import get_musicbrainz_client
|
||||||
|
mb = get_musicbrainz_client()
|
||||||
|
results = mb.search_artists("radiohead", limit=1)
|
||||||
|
if results:
|
||||||
|
return True, "MusicBrainz reachable"
|
||||||
|
return False, "MusicBrainz returned no results — may be rate-limited or unreachable."
|
||||||
|
except Exception as e:
|
||||||
|
return False, f"MusicBrainz connection error: {str(e)}"
|
||||||
elif service == "soundcloud":
|
elif service == "soundcloud":
|
||||||
# Anonymous SoundCloud has no auth, so "test" really means
|
# Anonymous SoundCloud has no auth, so "test" really means
|
||||||
# "is yt-dlp installed and can it reach SoundCloud right now."
|
# "is yt-dlp installed and can it reach SoundCloud right now."
|
||||||
|
|
|
||||||
|
|
@ -1859,6 +1859,7 @@ SERVICE_CONFIG_REGISTRY = {
|
||||||
'spotify': {'required': ['client_id', 'client_secret']},
|
'spotify': {'required': ['client_id', 'client_secret']},
|
||||||
'itunes': {'always': True}, # default storefront works anon
|
'itunes': {'always': True}, # default storefront works anon
|
||||||
'deezer': {'always': True}, # anon search works, premium ARL is optional
|
'deezer': {'always': True}, # anon search works, premium ARL is optional
|
||||||
|
'musicbrainz': {'always': True}, # public API, no credentials required
|
||||||
'amazon': {'always': True}, # T2Tunes proxy, no credentials required
|
'amazon': {'always': True}, # T2Tunes proxy, no credentials required
|
||||||
'discogs': {'required': ['token']},
|
'discogs': {'required': ['token']},
|
||||||
'tidal': {'custom': lambda _svc: _tidal_has_auth_token()},
|
'tidal': {'custom': lambda _svc: _tidal_has_auth_token()},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue