[7] #945 suppress agent not supported message for agentless libraries

This commit is contained in:
meisnate12 2022-07-22 21:25:37 -04:00
parent 9132b6abf3
commit 4a91d35174
3 changed files with 8 additions and 5 deletions

View file

@ -1 +1 @@
1.17.2-develop6 1.17.2-develop7

View file

@ -297,6 +297,7 @@ class ConfigFile:
"prioritize_assets": check_for_attribute(self.data, "prioritize_assets", parent="settings", var_type="bool", default=False), "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), "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), "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_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_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), "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_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_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": 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), "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"), "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), "ignore_ids": check_for_attribute(self.data, "ignore_ids", parent="settings", var_type="int_list", default_is_none=True),

View file

@ -1,6 +1,6 @@
import re, requests import re, requests
from modules import util from modules import util
from modules.util import Failed from modules.util import Failed, NonExisting
from plexapi.exceptions import BadRequest from plexapi.exceptions import BadRequest
logger = util.logger logger = util.logger
@ -277,8 +277,8 @@ class Convert:
anidb_id = self._mal_to_anidb[int(check_id)] anidb_id = self._mal_to_anidb[int(check_id)]
else: else:
raise Failed(f"AniDB ID not found for MyAnimeList ID: {check_id}") raise Failed(f"AniDB ID not found for MyAnimeList ID: {check_id}")
elif item_type == "local": raise Failed("No match in Plex") elif item_type == "local": raise NonExisting("No match in Plex")
else: raise Failed(f"Agent {item_type} not supported") else: raise NonExisting(f"Agent {item_type} not supported")
if anidb_id: if anidb_id:
if anidb_id in self._anidb_to_imdb: if anidb_id in self._anidb_to_imdb:
@ -344,6 +344,9 @@ class Convert:
raise Failed(f"No ID to convert") raise Failed(f"No ID to convert")
except Failed as e: except Failed as e:
logger.info(f'Mapping Error | {item.guid:<46} | {e} for "{item.title}"') 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: except BadRequest:
logger.stacktrace() logger.stacktrace()
logger.info(f'Mapping Error | {item.guid:<46} | Bad Request for "{item.title}"') logger.info(f'Mapping Error | {item.guid:<46} | Bad Request for "{item.title}"')