Added some failsafe to deal with improper JSON returned from Radarr tags API endpoint.

This commit is contained in:
morpheus65535 2022-01-15 17:21:46 -05:00
parent 9b48b59860
commit 62ef614d30
1 changed files with 7 additions and 1 deletions

View File

@ -365,8 +365,14 @@ def get_tags():
except requests.exceptions.RequestException:
logging.exception("BAZARR Error trying to get tags from Radarr.")
return []
except requests.exceptions.HTTPError:
logging.exception("BAZARR Exception while trying to get tags from Radarr.")
return []
else:
return tagsDict.json()
try:
return tagsDict.json()
except Exception:
return []
def movieParser(movie, action, tags_dict, movie_default_profile, audio_profiles):