From 93f3ded8774c6d1c3112921a2be379ce1c288660 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Mon, 6 Feb 2023 17:00:32 -0500 Subject: [PATCH] [60] catch 406 error --- VERSION | 2 +- modules/plex.py | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 7ebaf2df..e7603a43 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.18.3-develop59 +1.18.3-develop60 diff --git a/modules/plex.py b/modules/plex.py index 8a20d125..98399988 100644 --- a/modules/plex.py +++ b/modules/plex.py @@ -1139,9 +1139,17 @@ class Plex(Library): if image: logger.info(f"{text} | Reset from {location}") if poster: - self.upload_poster(item, image, url=image_url) + try: + self.upload_poster(item, image, url=image_url) + except BadRequest as e: + logger.stacktrace() + logger.error(f"Plex Error: {e}") else: - self.upload_background(item, image, url=image_url) + try: + self.upload_background(item, image, url=image_url) + except BadRequest as e: + logger.stacktrace() + logger.error(f"Plex Error: {e}") if poster and "Overlay" in [la.tag for la in self.item_labels(item)]: logger.info(self.edit_tags("label", item, remove_tags="Overlay", do_print=False)) else: