[45] catch MAL errors

This commit is contained in:
meisnate12 2023-04-28 11:18:45 -04:00
parent 3589c42a48
commit 15becc238a
4 changed files with 11 additions and 6 deletions

View file

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

View file

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

View file

@ -151,6 +151,7 @@ class Overlays:
has_original = None
new_backup = None
changed_image = False
if poster:
if image_compare and str(poster.compare) != str(image_compare):
changed_image = True
@ -185,7 +186,7 @@ class Overlays:
poster_compare = None
if poster is None and has_original is None:
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:
if not self.library.reapply_overlays and new_backup:
logger.trace(" Overlay Reason: New image detected")

View file

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