From 1e79f322560c57baa55b2831cab8507844fd342e Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Thu, 10 Feb 2022 10:13:14 -0500 Subject: [PATCH] catch 500 error --- VERSION | 2 +- modules/config.py | 2 +- modules/library.py | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 8ccf14a5..339dcbc5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.15.1-develop61 +1.15.1-develop62 diff --git a/modules/config.py b/modules/config.py index b083d590..c1626a06 100644 --- a/modules/config.py +++ b/modules/config.py @@ -379,7 +379,7 @@ class ConfigFile: try: self.OMDb = OMDb(self, { "apikey": check_for_attribute(self.data, "apikey", parent="omdb", throw=True), - "cache_expiration": check_for_attribute(self.data, "cache_expiration", parent="settings", var_type="int", default=60) + "expiration": check_for_attribute(self.data, "cache_expiration", parent="settings", var_type="int", default=60) }) except Failed as e: self.errors.append(e) diff --git a/modules/library.py b/modules/library.py index a8e931af..035c68be 100644 --- a/modules/library.py +++ b/modules/library.py @@ -4,6 +4,7 @@ from modules import util from modules.meta import MetadataFile from modules.util import Failed from PIL import Image +from plexapi.exceptions import BadRequest from ruamel import yaml logger = logging.getLogger("Plex Meta Manager") @@ -185,9 +186,9 @@ class Library(ABC): self.edit_tags("label", item, add_tags=[f"{overlay_name} Overlay"]) poster_uploaded = True logger.info(f"Detail: Overlay: {overlay_name} applied to {item.title}") - except OSError as e: + except (OSError, BadRequest) as e: util.print_stacktrace() - logger.error(f"Overlay Error: {e}") + raise Failed(f"Overlay Error: {e}") background_uploaded = False if background is not None: