catch 500 error

pull/707/head
meisnate12 3 years ago
parent 16049b7a45
commit 1e79f32256

@ -1 +1 @@
1.15.1-develop61 1.15.1-develop62

@ -379,7 +379,7 @@ class ConfigFile:
try: try:
self.OMDb = OMDb(self, { self.OMDb = OMDb(self, {
"apikey": check_for_attribute(self.data, "apikey", parent="omdb", throw=True), "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: except Failed as e:
self.errors.append(e) self.errors.append(e)

@ -4,6 +4,7 @@ from modules import util
from modules.meta import MetadataFile from modules.meta import MetadataFile
from modules.util import Failed from modules.util import Failed
from PIL import Image from PIL import Image
from plexapi.exceptions import BadRequest
from ruamel import yaml from ruamel import yaml
logger = logging.getLogger("Plex Meta Manager") logger = logging.getLogger("Plex Meta Manager")
@ -185,9 +186,9 @@ class Library(ABC):
self.edit_tags("label", item, add_tags=[f"{overlay_name} Overlay"]) self.edit_tags("label", item, add_tags=[f"{overlay_name} Overlay"])
poster_uploaded = True poster_uploaded = True
logger.info(f"Detail: Overlay: {overlay_name} applied to {item.title}") logger.info(f"Detail: Overlay: {overlay_name} applied to {item.title}")
except OSError as e: except (OSError, BadRequest) as e:
util.print_stacktrace() util.print_stacktrace()
logger.error(f"Overlay Error: {e}") raise Failed(f"Overlay Error: {e}")
background_uploaded = False background_uploaded = False
if background is not None: if background is not None:

Loading…
Cancel
Save