Additional tweaks to search_artist function.

This commit is contained in:
zebra 2025-06-12 16:28:23 -07:00
parent 0cfee8205c
commit 51871fd296

View File

@ -79,7 +79,11 @@ def search_artist(name, timeout_seconds=15):
)
resp.raise_for_status()
results = resp.json()
return results[0] if results else None
if results:
artist = results[0]
print(f"Found artist: {artist.get('artistName') or artist.get('title')}")
return artist
return None
except Timeout:
print(f"Lidarr artist search timed out after {timeout_seconds} seconds.")
return None