summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2022-12-01 16:52:42 -0500
committermorpheus65535 <[email protected]>2022-12-01 16:52:42 -0500
commitea5bf9ad072c73874fcf39fef45f6fc718a4e616 (patch)
treebc2ed9f1ca497ae3b6733fd5a2bb6bd8e0140d86
parent7a43e284aebc10089a400c6276271488b611b459 (diff)
downloadbazarr-ea5bf9ad072c73874fcf39fef45f6fc718a4e616.tar.gz
bazarr-ea5bf9ad072c73874fcf39fef45f6fc718a4e616.zip
Removed call to deprecated language profile endpoint in Sonarr v4. #1998v1.1.3-beta.27
-rw-r--r--bazarr/sonarr/sync/utils.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/bazarr/sonarr/sync/utils.py b/bazarr/sonarr/sync/utils.py
index 13f00b61a..031a9c9c9 100644
--- a/bazarr/sonarr/sync/utils.py
+++ b/bazarr/sonarr/sync/utils.py
@@ -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():