From 93612434e59a99f858a33667fae8835bb3473c53 Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Thu, 1 Sep 2022 06:49:04 -0400 Subject: [PATCH] Fixed improper parsing of series metadata when receiving an event from Sonarr SignalR feed. --- bazarr/sonarr/sync/series.py | 4 ++-- bazarr/sonarr/sync/utils.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bazarr/sonarr/sync/series.py b/bazarr/sonarr/sync/series.py index d6bf94a30..2e01c5a61 100644 --- a/bazarr/sonarr/sync/series.py +++ b/bazarr/sonarr/sync/series.py @@ -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: diff --git a/bazarr/sonarr/sync/utils.py b/bazarr/sonarr/sync/utils.py index e03f40ff3..13f00b61a 100644 --- a/bazarr/sonarr/sync/utils.py +++ b/bazarr/sonarr/sync/utils.py @@ -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()