1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-26 17:47:20 +00:00

Fixed GetSonarrInfo.version() to make sure it doesn't prevent Bazarr startup.

This commit is contained in:
morpheus65535 2022-03-02 06:34:43 -05:00
parent 6b65034810
commit 4b84a9c64c

View file

@ -258,8 +258,12 @@ class GetSonarrInfo:
else:
raise json.decoder.JSONDecodeError
except json.decoder.JSONDecodeError:
sv = url_sonarr() + "/api/v3/system/status?apikey=" + settings.sonarr.apikey
sonarr_version = requests.get(sv, timeout=60, verify=False, headers=headers).json()['version']
try:
sv = url_sonarr() + "/api/v3/system/status?apikey=" + settings.sonarr.apikey
sonarr_version = requests.get(sv, timeout=60, verify=False, headers=headers).json()['version']
except json.decoder.JSONDecodeError:
logging.debug('BAZARR cannot get Sonarr version')
sonarr_version = 'unknown'
except Exception:
logging.debug('BAZARR cannot get Sonarr version')
sonarr_version = 'unknown'