Removed call to deprecated language profile endpoint in Sonarr v4. #1998

pull/2004/head v1.1.3-beta.27
morpheus65535 2 years ago
parent 7a43e284ae
commit ea5bf9ad07

@ -16,6 +16,9 @@ def get_profile_list():
if get_sonarr_info.is_legacy():
url_sonarr_api_series = url_sonarr() + "/api/profile?apikey=" + apikey_sonarr
else:
if not get_sonarr_info.version().startswith('3.'):
# return an empty list when using Sonarr >= v4 that does not support series languages profiles anymore
return profiles_list
url_sonarr_api_series = url_sonarr() + "/api/v3/languageprofile?apikey=" + apikey_sonarr
try:
@ -30,10 +33,6 @@ def get_profile_list():
logging.exception("BAZARR Error trying to get profiles from Sonarr.")
return None
# return an empty list when using Sonarr v4 that do not support series languages profiles anymore
if profiles_json.status_code == 404:
return profiles_list
# Parsing data returned from Sonarr
if get_sonarr_info.is_legacy():
for profile in profiles_json.json():

Loading…
Cancel
Save