#593 Adds show_asset_not_needed Setting

pull/652/head
meisnate12 3 years ago
parent f617920a4f
commit 93a67dd59d

@ -270,6 +270,7 @@ class ConfigFile:
"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_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),
"sync_mode": check_for_attribute(self.data, "sync_mode", parent="settings", default="append", test_list=sync_modes), "sync_mode": check_for_attribute(self.data, "sync_mode", parent="settings", default="append", test_list=sync_modes),
"default_collection_order": check_for_attribute(self.data, "default_collection_order", parent="settings", default_is_none=True), "default_collection_order": check_for_attribute(self.data, "default_collection_order", parent="settings", default_is_none=True),
"minimum_items": check_for_attribute(self.data, "minimum_items", parent="settings", var_type="int", default=1), "minimum_items": check_for_attribute(self.data, "minimum_items", parent="settings", var_type="int", default=1),
@ -586,6 +587,7 @@ class ConfigFile:
params["download_url_assets"] = check_for_attribute(lib, "download_url_assets", parent="settings", var_type="bool", default=self.general["download_url_assets"], do_print=False, save=False) params["download_url_assets"] = check_for_attribute(lib, "download_url_assets", parent="settings", var_type="bool", default=self.general["download_url_assets"], do_print=False, save=False)
params["show_missing_season_assets"] = check_for_attribute(lib, "show_missing_season_assets", parent="settings", var_type="bool", default=self.general["show_missing_season_assets"], do_print=False, save=False) params["show_missing_season_assets"] = check_for_attribute(lib, "show_missing_season_assets", parent="settings", var_type="bool", default=self.general["show_missing_season_assets"], do_print=False, save=False)
params["show_missing_episode_assets"] = check_for_attribute(lib, "show_missing_episode_assets", parent="settings", var_type="bool", default=self.general["show_missing_episode_assets"], do_print=False, save=False) params["show_missing_episode_assets"] = check_for_attribute(lib, "show_missing_episode_assets", parent="settings", var_type="bool", default=self.general["show_missing_episode_assets"], do_print=False, save=False)
params["show_asset_not_needed"] = check_for_attribute(lib, "show_asset_not_needed", parent="settings", var_type="bool", default=self.general["show_asset_not_needed"], do_print=False, save=False)
params["minimum_items"] = check_for_attribute(lib, "minimum_items", parent="settings", var_type="int", default=self.general["minimum_items"], do_print=False, save=False) params["minimum_items"] = check_for_attribute(lib, "minimum_items", parent="settings", var_type="int", default=self.general["minimum_items"], do_print=False, save=False)
params["item_refresh_delay"] = check_for_attribute(lib, "item_refresh_delay", parent="settings", var_type="int", default=self.general["item_refresh_delay"], do_print=False, save=False) params["item_refresh_delay"] = check_for_attribute(lib, "item_refresh_delay", parent="settings", var_type="int", default=self.general["item_refresh_delay"], do_print=False, save=False)
params["delete_below_minimum"] = check_for_attribute(lib, "delete_below_minimum", parent="settings", var_type="bool", default=self.general["delete_below_minimum"], do_print=False, save=False) params["delete_below_minimum"] = check_for_attribute(lib, "delete_below_minimum", parent="settings", var_type="bool", default=self.general["delete_below_minimum"], do_print=False, save=False)

@ -47,6 +47,7 @@ class Library(ABC):
self.download_url_assets = params["download_url_assets"] self.download_url_assets = params["download_url_assets"]
self.show_missing_season_assets = params["show_missing_season_assets"] self.show_missing_season_assets = params["show_missing_season_assets"]
self.show_missing_episode_assets = params["show_missing_episode_assets"] self.show_missing_episode_assets = params["show_missing_episode_assets"]
self.show_asset_not_needed = params["show_asset_not_needed"]
self.sync_mode = params["sync_mode"] self.sync_mode = params["sync_mode"]
self.default_collection_order = params["default_collection_order"] self.default_collection_order = params["default_collection_order"]
self.minimum_items = params["minimum_items"] self.minimum_items = params["minimum_items"]
@ -145,7 +146,7 @@ class Library(ABC):
self._upload_image(item, poster) self._upload_image(item, poster)
poster_uploaded = True poster_uploaded = True
logger.info(f"Detail: {poster.attribute} updated {poster.message}") logger.info(f"Detail: {poster.attribute} updated {poster.message}")
else: elif self.show_asset_not_needed:
logger.info(f"Detail: {poster.prefix}poster update not needed") logger.info(f"Detail: {poster.prefix}poster update not needed")
except Failed: except Failed:
util.print_stacktrace() util.print_stacktrace()
@ -195,7 +196,7 @@ class Library(ABC):
self._upload_image(item, background) self._upload_image(item, background)
background_uploaded = True background_uploaded = True
logger.info(f"Detail: {background.attribute} updated {background.message}") logger.info(f"Detail: {background.attribute} updated {background.message}")
else: elif self.show_asset_not_needed:
logger.info(f"Detail: {background.prefix}background update not needed") logger.info(f"Detail: {background.prefix}background update not needed")
except Failed: except Failed:
util.print_stacktrace() util.print_stacktrace()

Loading…
Cancel
Save