From 4a91d35174a51f7a8621b88aead01aa4923442b8 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Fri, 22 Jul 2022 21:25:37 -0400 Subject: [PATCH] [7] #945 suppress agent not supported message for agentless libraries --- VERSION | 2 +- modules/config.py | 2 +- modules/convert.py | 9 ++++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index b553ac8a..6a54ee11 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.17.2-develop6 +1.17.2-develop7 diff --git a/modules/config.py b/modules/config.py index 5492e120..447846f7 100644 --- a/modules/config.py +++ b/modules/config.py @@ -297,6 +297,7 @@ class ConfigFile: "prioritize_assets": check_for_attribute(self.data, "prioritize_assets", parent="settings", var_type="bool", default=False), "dimensional_asset_rename": check_for_attribute(self.data, "dimensional_asset_rename", parent="settings", var_type="bool", default=False), "download_url_assets": check_for_attribute(self.data, "download_url_assets", parent="settings", var_type="bool", default=False), + "show_missing_assets": check_for_attribute(self.data, "show_missing_assets", parent="settings", var_type="bool", default=True), "show_missing_season_assets": check_for_attribute(self.data, "show_missing_season_assets", parent="settings", var_type="bool", default=False), "show_missing_episode_assets": check_for_attribute(self.data, "show_missing_episode_assets", parent="settings", var_type="bool", default=False), "show_asset_not_needed": check_for_attribute(self.data, "show_asset_not_needed", parent="settings", var_type="bool", default=True), @@ -313,7 +314,6 @@ class ConfigFile: "show_filtered": check_for_attribute(self.data, "show_filtered", parent="settings", var_type="bool", default=False), "show_options": check_for_attribute(self.data, "show_options", parent="settings", var_type="bool", default=False), "show_missing": check_for_attribute(self.data, "show_missing", parent="settings", var_type="bool", default=True), - "show_missing_assets": check_for_attribute(self.data, "show_missing_assets", parent="settings", var_type="bool", default=True), "save_report": check_for_attribute(self.data, "save_report", parent="settings", var_type="bool", default=False), "tvdb_language": check_for_attribute(self.data, "tvdb_language", parent="settings", default="default"), "ignore_ids": check_for_attribute(self.data, "ignore_ids", parent="settings", var_type="int_list", default_is_none=True), diff --git a/modules/convert.py b/modules/convert.py index 85ed0f69..b3d645b5 100644 --- a/modules/convert.py +++ b/modules/convert.py @@ -1,6 +1,6 @@ import re, requests from modules import util -from modules.util import Failed +from modules.util import Failed, NonExisting from plexapi.exceptions import BadRequest logger = util.logger @@ -277,8 +277,8 @@ class Convert: anidb_id = self._mal_to_anidb[int(check_id)] else: raise Failed(f"AniDB ID not found for MyAnimeList ID: {check_id}") - elif item_type == "local": raise Failed("No match in Plex") - else: raise Failed(f"Agent {item_type} not supported") + elif item_type == "local": raise NonExisting("No match in Plex") + else: raise NonExisting(f"Agent {item_type} not supported") if anidb_id: if anidb_id in self._anidb_to_imdb: @@ -344,6 +344,9 @@ class Convert: raise Failed(f"No ID to convert") except Failed as e: logger.info(f'Mapping Error | {item.guid:<46} | {e} for "{item.title}"') + except NonExisting as e: + if not library.is_other: + logger.info(f'Mapping Error | {item.guid:<46} | {e} for "{item.title}"') except BadRequest: logger.stacktrace() logger.info(f'Mapping Error | {item.guid:<46} | Bad Request for "{item.title}"')