This commit is contained in:
meisnate12 2021-04-05 00:09:26 -04:00
parent 64faafc7ac
commit 1292ea0ccb

View file

@ -1,4 +1,5 @@
import logging, requests
from json.decoder import JSONDecodeError
from modules import util
from modules.util import Failed
from retrying import retry
@ -144,6 +145,10 @@ class SonarrAPI:
except KeyError:
logger.debug(url_json)
logger.error(f"Sonarr Error: {response.json()}")
except JSONDecodeError:
logger.debug(url_json)
logger.error(f"Sonarr Error: {response}")
logger.info(f"{add_count} Show{'s' if add_count > 1 else ''} added to Sonarr")
@retry(stop_max_attempt_number=6, wait_fixed=10000)