[45] catch MAL errors

pull/1409/head
meisnate12 2 years ago
parent 3589c42a48
commit 15becc238a

@ -1 +1 @@
1.19.0-develop44 1.19.0-develop45

@ -88,9 +88,13 @@ class MyAnimeList:
self.expiration = params["cache_expiration"] self.expiration = params["cache_expiration"]
self.authorization = params["authorization"] self.authorization = params["authorization"]
logger.secret(self.client_secret) logger.secret(self.client_secret)
if not self._save(self.authorization): try:
if not self._refresh(): if not self._save(self.authorization):
self._authorization() if not self._refresh():
self._authorization()
except Exception:
logger.stacktrace()
raise Failed("Tautulli Error: Failed to Connect")
self._genres = {} self._genres = {}
self._studios = {} self._studios = {}
self._delay = None self._delay = None

@ -151,6 +151,7 @@ class Overlays:
has_original = None has_original = None
new_backup = None new_backup = None
changed_image = False
if poster: if poster:
if image_compare and str(poster.compare) != str(image_compare): if image_compare and str(poster.compare) != str(image_compare):
changed_image = True changed_image = True
@ -185,7 +186,7 @@ class Overlays:
poster_compare = None poster_compare = None
if poster is None and has_original is None: if poster is None and has_original is None:
logger.error(f" Overlay Error: No poster found") logger.error(f" Overlay Error: No poster found")
elif self.library.reapply_overlays or new_backup or overlay_change: elif self.library.reapply_overlays or new_backup or overlay_change or changed_image:
try: try:
if not self.library.reapply_overlays and new_backup: if not self.library.reapply_overlays and new_backup:
logger.trace(" Overlay Reason: New image detected") logger.trace(" Overlay Reason: New image detected")

@ -20,7 +20,7 @@ class Tautulli:
response = self._request("get_tautulli_info") response = self._request("get_tautulli_info")
except Exception: except Exception:
logger.stacktrace() logger.stacktrace()
raise Failed("Tautulli Error: Invalid url") raise Failed("Tautulli Error: Invalid URL")
if response["response"]["result"] != "success": if response["response"]["result"] != "success":
raise Failed(f"Tautulli Error: {response['response']['message']}") raise Failed(f"Tautulli Error: {response['response']['message']}")
self.has_section = True if int(response["response"]["data"]["tautulli_version"].split(".")[1]) > 11 else False self.has_section = True if int(response["response"]["data"]["tautulli_version"].split(".")[1]) > 11 else False

Loading…
Cancel
Save