Additional tweaks to search_artist function.
This commit is contained in:
parent
0cfee8205c
commit
51871fd296
@ -79,7 +79,11 @@ def search_artist(name, timeout_seconds=15):
|
|||||||
)
|
)
|
||||||
resp.raise_for_status()
|
resp.raise_for_status()
|
||||||
results = resp.json()
|
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:
|
except Timeout:
|
||||||
print(f"Lidarr artist search timed out after {timeout_seconds} seconds.")
|
print(f"Lidarr artist search timed out after {timeout_seconds} seconds.")
|
||||||
return None
|
return None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user