[69] fix resolution default

pull/1237/head
meisnate12 2 years ago
parent 87e284c5e9
commit f9b149c7c8

@ -1 +1 @@
1.18.0-develop68 1.18.0-develop69

@ -22,7 +22,6 @@ class Library(ABC):
self.queue_current = 0 self.queue_current = 0
self.metadata_files = [] self.metadata_files = []
self.overlay_files = [] self.overlay_files = []
self.overlay_names = []
self.movie_map = {} self.movie_map = {}
self.show_map = {} self.show_map = {}
self.imdb_map = {} self.imdb_map = {}
@ -32,7 +31,6 @@ class Library(ABC):
self.show_rating_key_map = {} self.show_rating_key_map = {}
self.cached_items = {} self.cached_items = {}
self.run_again = [] self.run_again = []
self.overlays_old = []
self.type = "" self.type = ""
self.config = config self.config = config
self.name = params["name"] self.name = params["name"]

@ -1565,8 +1565,9 @@ class OverlayFile(DataFile):
super().__init__(config, file_type, path, temp_vars, asset_directory) super().__init__(config, file_type, path, temp_vars, asset_directory)
self.library = library self.library = library
self.data_type = "Overlay" self.data_type = "Overlay"
self.file_num = len(library.overlay_files)
logger.info("") logger.info("")
logger.info(f"Loading Overlay {file_type}: {path}") logger.info(f"Loading Overlay {self.file_num} {file_type}: {path}")
logger.debug("") logger.debug("")
data = self.load_file(self.type, self.path, overlay=True) data = self.load_file(self.type, self.path, overlay=True)
self.overlays = get_dict("overlays", data) self.overlays = get_dict("overlays", data)

@ -70,7 +70,6 @@ class Overlay:
self.overlay_file = overlay_file self.overlay_file = overlay_file
self.original_mapping_name = original_mapping_name self.original_mapping_name = original_mapping_name
self.data = overlay_data self.data = overlay_data
self.suppress = suppress
self.level = level self.level = level
self.keys = [] self.keys = []
self.updated = False self.updated = False
@ -107,17 +106,11 @@ class Overlay:
if "name" not in self.data or not self.data["name"]: if "name" not in self.data or not self.data["name"]:
raise Failed(f"Overlay Error: overlay must have the name attribute") raise Failed(f"Overlay Error: overlay must have the name attribute")
self.name = str(self.data["name"]) self.name = str(self.data["name"])
if self.original_mapping_name not in library.overlay_names:
library.overlay_names.append(self.original_mapping_name) self.prefix = f"Overlay File ({self.overlay_file.file_num}) "
self.mapping_name = self.original_mapping_name
else: self.mapping_name = f"{self.prefix}{self.original_mapping_name}"
name_count = 1 self.suppress = [f"{self.prefix}{s}" for s in suppress]
test_name = f"{self.original_mapping_name} ({name_count})"
while test_name in library.overlay_names:
name_count += 1
test_name = f"{self.original_mapping_name} ({name_count})"
library.overlay_names.append(test_name)
self.mapping_name = test_name
if "group" in self.data and self.data["group"]: if "group" in self.data and self.data["group"]:
self.group = str(self.data["group"]) self.group = str(self.data["group"])

@ -379,9 +379,8 @@ class Overlays:
logger.separator(f"Gathering Items for {k} Overlay", space=False, border=False) logger.separator(f"Gathering Items for {k} Overlay", space=False, border=False)
if builder.overlay.mapping_name in properties: prop_name = builder.overlay.mapping_name
raise Failed(f"Overlay Error: Overlay {builder.overlay.mapping_name} already exists") properties[prop_name] = builder.overlay
properties[builder.overlay.mapping_name] = builder.overlay
builder.display_filters() builder.display_filters()
@ -403,13 +402,13 @@ class Overlays:
for item in builder.found_items: for item in builder.found_items:
key_to_item[item.ratingKey] = item key_to_item[item.ratingKey] = item
added_titles.append(item) added_titles.append(item)
if item.ratingKey not in properties[builder.overlay.mapping_name].keys: if item.ratingKey not in properties[prop_name].keys:
properties[builder.overlay.mapping_name].keys.append(item.ratingKey) properties[prop_name].keys.append(item.ratingKey)
if added_titles: if added_titles:
logger.info(f"{len(added_titles)} Items found for {builder.overlay.mapping_name} Overlay") logger.info(f"{len(added_titles)} Items found for {prop_name}")
logger.trace(f"Titles Found: {[self.library.get_item_sort_title(a, atr='title') for a in added_titles]}") logger.trace(f"Titles Found: {[self.library.get_item_sort_title(a, atr='title') for a in added_titles]}")
else: else:
logger.warning(f"No Items found for {builder.overlay.mapping_name} Overlay") logger.warning(f"No Items found for {prop_name}")
logger.info("") logger.info("")
except NotScheduled as e: except NotScheduled as e:
logger.info(e) logger.info(e)

Loading…
Cancel
Save