Fixed improper parsing of series metadata when receiving an event from Sonarr SignalR feed.

This commit is contained in:
morpheus65535 2022-09-01 06:49:04 -04:00
parent a880386184
commit 93612434e5
2 changed files with 3 additions and 3 deletions

View file

@ -181,11 +181,11 @@ def update_one_series(series_id, action):
return
else:
if action == 'updated' and existing_series:
series = seriesParser(series_data, action='update', tags_dict=tagsDict,
series = seriesParser(series_data[0], action='update', tags_dict=tagsDict,
serie_default_profile=serie_default_profile,
audio_profiles=audio_profiles)
elif action == 'updated' and not existing_series:
series = seriesParser(series_data, action='insert', tags_dict=tagsDict,
series = seriesParser(series_data[0], action='insert', tags_dict=tagsDict,
serie_default_profile=serie_default_profile,
audio_profiles=audio_profiles)
except Exception:

View file

@ -93,7 +93,7 @@ def get_series_from_sonarr_api(url, apikey_sonarr, sonarr_series_id=None):
else:
result = r.json()
if isinstance(result, dict):
return list(result)
return [result]
else:
return r.json()