From 2df51e78ad98fbc76c554db1f3c95b6b3934ebd6 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Thu, 30 Jun 2022 11:17:48 -0400 Subject: [PATCH] [6] clean up asset warnings --- VERSION | 2 +- modules/overlays.py | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/VERSION b/VERSION index 0f638e05..7f052aa5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.17.1-develop5 +1.17.1-develop6 diff --git a/modules/overlays.py b/modules/overlays.py index 9b307324..a3027af3 100644 --- a/modules/overlays.py +++ b/modules/overlays.py @@ -132,11 +132,14 @@ class Overlays: try: poster, background, item_dir, name = self.library.find_item_assets(item) - if not poster and self.library.assets_for_all and self.library.show_missing_assets: - if self.library.asset_folders: - logger.warning(f"Asset Warning: No poster found in the assets folder '{item_dir}'") - else: - logger.warning(f"Asset Warning: No poster '{name}' found in the assets folders") + if not poster and self.library.assets_for_all: + if (isinstance(item, Episode) and self.library.show_missing_episode_assets) or \ + (isinstance(item, Season) and self.library.show_missing_season_assets) or \ + (not isinstance(item, (Episode, Season)) and self.library.show_missing_assets): + if self.library.asset_folders: + logger.warning(f"Asset Warning: No poster found for '{item_title}' in the assets folder '{item_dir}'") + else: + logger.warning(f"Asset Warning: No poster '{name}' found in the assets folders") if background: self.library.upload_images(item, background=background) except Failed as e: