|
|
@ -616,11 +616,18 @@ class MetadataFile(DataFile):
|
|
|
|
logger.separator(f"Loading Images {file_type}: {path}")
|
|
|
|
logger.separator(f"Loading Images {file_type}: {path}")
|
|
|
|
logger.info("")
|
|
|
|
logger.info("")
|
|
|
|
self.metadata = {}
|
|
|
|
self.metadata = {}
|
|
|
|
data = self.load_file(self.type, self.path, images=True)
|
|
|
|
if self.type == "PMM Default":
|
|
|
|
|
|
|
|
if self.path.endswith(".yml"):
|
|
|
|
|
|
|
|
self.path = self.path[:-4]
|
|
|
|
|
|
|
|
elif self.path.endswith(".yaml"):
|
|
|
|
|
|
|
|
self.path = self.path[:-5]
|
|
|
|
|
|
|
|
data = self.load_file(self.type, "set", images=True, folder=f"{self.path}/")
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
data = self.load_file(self.type, self.path, images=True)
|
|
|
|
methods = {t.lower(): t for t in self.temp_vars}
|
|
|
|
methods = {t.lower(): t for t in self.temp_vars}
|
|
|
|
|
|
|
|
|
|
|
|
use_all = True if "use_all" in methods and self.temp_vars[methods["use_all"]] else False
|
|
|
|
use_all = True if "use_all" in methods and self.temp_vars[methods["use_all"]] else False
|
|
|
|
logger.info(f"Use All Sets: {use_all}")
|
|
|
|
logger.info(f"Use All Sections: {use_all}")
|
|
|
|
|
|
|
|
|
|
|
|
exclude = []
|
|
|
|
exclude = []
|
|
|
|
if "exclude" in methods:
|
|
|
|
if "exclude" in methods:
|
|
|
@ -652,7 +659,7 @@ class MetadataFile(DataFile):
|
|
|
|
self.update_episodes = util.parse("Images", "update_episodes", self.temp_vars, datatype="bool", methods=methods, default=True)
|
|
|
|
self.update_episodes = util.parse("Images", "update_episodes", self.temp_vars, datatype="bool", methods=methods, default=True)
|
|
|
|
logger.info(f"Update Episodes: {self.update_episodes}")
|
|
|
|
logger.info(f"Update Episodes: {self.update_episodes}")
|
|
|
|
item_attr = "movies" if self.library.is_movie else "shows"
|
|
|
|
item_attr = "movies" if self.library.is_movie else "shows"
|
|
|
|
for set_key, set_data in get_dict("sets", data).items():
|
|
|
|
for set_key, set_data in get_dict("sections", data).items():
|
|
|
|
if not isinstance(set_data, dict):
|
|
|
|
if not isinstance(set_data, dict):
|
|
|
|
raise Failed("Image Set Error: Set Data must be a dictionary")
|
|
|
|
raise Failed("Image Set Error: Set Data must be a dictionary")
|
|
|
|
elif item_attr not in set_data:
|
|
|
|
elif item_attr not in set_data:
|
|
|
@ -686,49 +693,53 @@ class MetadataFile(DataFile):
|
|
|
|
prioritized_style = ps
|
|
|
|
prioritized_style = ps
|
|
|
|
break
|
|
|
|
break
|
|
|
|
if f"style_{set_key}" in methods:
|
|
|
|
if f"style_{set_key}" in methods:
|
|
|
|
style = util.parse("Images", f"style_{set_key}", self.temp_vars, methods=methods, default=default_style)
|
|
|
|
style_key = util.parse("Images", f"style_{set_key}", self.temp_vars, methods=methods, default=default_style)
|
|
|
|
logger.info(f"Style {set_key}: {style}")
|
|
|
|
logger.info(f"Style {set_key}: {style_key}")
|
|
|
|
if style not in styles:
|
|
|
|
if style_key not in styles:
|
|
|
|
p_warning = f"Image Set Warning: {set_key} has no style: {style} using"
|
|
|
|
p_warning = f"Image Set Warning: {set_key} has no style: {style_key} using"
|
|
|
|
if prioritized_style:
|
|
|
|
if prioritized_style:
|
|
|
|
logger.warning(f"{p_warning} Prioritized Style: {prioritized_style}")
|
|
|
|
logger.warning(f"{p_warning} Prioritized Style: {prioritized_style}")
|
|
|
|
style = prioritized_style
|
|
|
|
style_key = prioritized_style
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
logger.warning(f"{p_warning} default: {default_style}. Options: {', '.join([s for s in styles])}")
|
|
|
|
logger.warning(f"{p_warning} default: {default_style}. Options: {', '.join([s for s in styles])}")
|
|
|
|
style = default_style
|
|
|
|
style_key = default_style
|
|
|
|
elif prioritized_style:
|
|
|
|
elif prioritized_style:
|
|
|
|
logger.info(f"Using Prioritized Style: {prioritized_style}")
|
|
|
|
logger.info(f"Using Prioritized Style: {prioritized_style}")
|
|
|
|
style = prioritized_style
|
|
|
|
style_key = prioritized_style
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
style = default_style
|
|
|
|
style_key = default_style
|
|
|
|
if self.update_collections and "collections" in set_data and set_data["collections"]:
|
|
|
|
if self.update_collections and "collections" in set_data and set_data["collections"]:
|
|
|
|
self.set_collections[set_key] = set_data["collections"]
|
|
|
|
self.set_collections[set_key] = set_data["collections"]
|
|
|
|
if f"set_file_{set_key}" in methods:
|
|
|
|
|
|
|
|
image_set = self.temp_vars[methods[f"set_file_{set_key}"]]
|
|
|
|
if f"style_file_{set_key}" in methods:
|
|
|
|
elif not styles[style]:
|
|
|
|
style_file = self.temp_vars[methods[f"style_file_{set_key}"]]
|
|
|
|
image_set = [{"pmm": f"{set_key}/{style}"}]
|
|
|
|
elif not styles[style_key]:
|
|
|
|
|
|
|
|
style_file = [{"pmm": f"{set_key}/{style_key}"}]
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
image_set = styles[style]
|
|
|
|
style_file = styles[style_key]
|
|
|
|
|
|
|
|
if not style_file:
|
|
|
|
|
|
|
|
raise Failed("Image Style Error: style file call attribute is blank")
|
|
|
|
|
|
|
|
style_dict = style_file[0] if isinstance(style_file, list) else style_file
|
|
|
|
|
|
|
|
if not isinstance(style_dict, dict):
|
|
|
|
|
|
|
|
raise Failed("Image Style Error: style file call attribute is not a dictionary")
|
|
|
|
|
|
|
|
elif not style_dict:
|
|
|
|
|
|
|
|
raise Failed("Image Style Error: style file call attribute dictionary is empty")
|
|
|
|
|
|
|
|
style_data = self.get_style_data(style_dict, set_key, items_data=set_data[item_attr])
|
|
|
|
for item_name, item_data in set_data[item_attr].items():
|
|
|
|
for item_name, item_data in set_data[item_attr].items():
|
|
|
|
|
|
|
|
if item_name not in style_data or not style_data[item_name]:
|
|
|
|
|
|
|
|
continue
|
|
|
|
if isinstance(item_data, dict):
|
|
|
|
if isinstance(item_data, dict):
|
|
|
|
if "mapping_id" not in item_data:
|
|
|
|
if "mapping_id" not in item_data:
|
|
|
|
raise Failed(f"Image Set Error: {set_key}: {item_name}: No mapping ID found")
|
|
|
|
raise Failed(f"Image Set Error: {set_key}: {item_name}: No mapping ID found")
|
|
|
|
meta_data = item_data
|
|
|
|
meta_data = item_data
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
meta_data = {"mapping_id": item_data}
|
|
|
|
meta_data = {"mapping_id": item_data}
|
|
|
|
if not image_set:
|
|
|
|
meta_data["style_data"] = style_data[item_name]
|
|
|
|
raise Failed("Image Set Error: style file call attribute is blank")
|
|
|
|
meta_data["set_key"] = set_key
|
|
|
|
set_dict = image_set[0] if isinstance(image_set, list) else image_set
|
|
|
|
meta_data["style_key"] = style_key
|
|
|
|
if not isinstance(set_dict, dict):
|
|
|
|
if "seasons" in style_data[item_name] and style_data[item_name]["seasons"]:
|
|
|
|
raise Failed("Image Set Error: style file call attribute is not a dictionary")
|
|
|
|
|
|
|
|
elif not set_dict:
|
|
|
|
|
|
|
|
raise Failed("Image Set Error: style file call attribute dictionary is empty")
|
|
|
|
|
|
|
|
image_set_data = self.get_image_set(set_dict, set_key, asset_data=set_data)
|
|
|
|
|
|
|
|
meta_data["image_set"] = image_set
|
|
|
|
|
|
|
|
meta_data["set"] = set_key
|
|
|
|
|
|
|
|
if item_name in image_set_data and isinstance(image_set_data[item_name], dict) and "seasons" in image_set_data[item_name] and image_set_data[item_name]["seasons"]:
|
|
|
|
|
|
|
|
season_dict = {}
|
|
|
|
season_dict = {}
|
|
|
|
for season_num, season_data in image_set_data[item_name]["seasons"].items():
|
|
|
|
for season_num, season_data in style_data[item_name]["seasons"].items():
|
|
|
|
season_dict[season_num] = {}
|
|
|
|
season_dict[season_num] = {}
|
|
|
|
if season_data and "episodes" in season_data:
|
|
|
|
if season_data and "episodes" in season_data:
|
|
|
|
episode_dict = {}
|
|
|
|
episode_dict = {}
|
|
|
@ -1209,18 +1220,20 @@ class MetadataFile(DataFile):
|
|
|
|
logger.info("")
|
|
|
|
logger.info("")
|
|
|
|
logger.info(f"Metadata File Loaded Successfully")
|
|
|
|
logger.info(f"Metadata File Loaded Successfully")
|
|
|
|
|
|
|
|
|
|
|
|
def get_image_set(self, set_data, set_name, asset_data=None):
|
|
|
|
def get_style_data(self, style_file, set_key, items_data=None):
|
|
|
|
set_id = ""
|
|
|
|
style_id = ""
|
|
|
|
for k, v in set_data.items():
|
|
|
|
for k, v in style_file.items():
|
|
|
|
set_id = f"{k}: {v}"
|
|
|
|
style_id = f"{k}: {v}"
|
|
|
|
break
|
|
|
|
break
|
|
|
|
if set_id not in self.library.image_sets and "git_assets" in set_data:
|
|
|
|
if style_id in self.library.image_styles:
|
|
|
|
if not set_data["git_assets"]:
|
|
|
|
return self.library.image_styles[style_id]
|
|
|
|
raise Failed("Image Set Error: git_assets cannot be blank")
|
|
|
|
if "git_style" in style_file:
|
|
|
|
if not asset_data:
|
|
|
|
if not style_file["git_style"]:
|
|
|
|
raise Failed("Image Set Error: asset_data cannot be blank")
|
|
|
|
raise Failed("Image Set Error: git_style cannot be blank")
|
|
|
|
top_tree, repo = self.config.GitHub.get_top_tree(set_data["git_assets"])
|
|
|
|
if not items_data:
|
|
|
|
sub = set_data["git_subfolder"] if "git_subfolder" in set_data and set_data["git_subfolder"] else ""
|
|
|
|
raise Failed("Image Set Error: items_data cannot be blank")
|
|
|
|
|
|
|
|
top_tree, repo = self.config.GitHub.get_top_tree(style_file["git_style"])
|
|
|
|
|
|
|
|
sub = style_file["git_subfolder"] if "git_subfolder" in style_file and style_file["git_subfolder"] else ""
|
|
|
|
sub = sub.replace("\\", "/")
|
|
|
|
sub = sub.replace("\\", "/")
|
|
|
|
if sub.startswith("/"):
|
|
|
|
if sub.startswith("/"):
|
|
|
|
sub = sub[1:]
|
|
|
|
sub = sub[1:]
|
|
|
@ -1267,10 +1280,8 @@ class MetadataFile(DataFile):
|
|
|
|
_data[attr] = attr_data
|
|
|
|
_data[attr] = attr_data
|
|
|
|
return _data
|
|
|
|
return _data
|
|
|
|
|
|
|
|
|
|
|
|
image_sets = {}
|
|
|
|
style_data = {}
|
|
|
|
for k in asset_data:
|
|
|
|
for k in items_data:
|
|
|
|
if k in ["styles", "collections"]:
|
|
|
|
|
|
|
|
continue
|
|
|
|
|
|
|
|
if k not in top_tree:
|
|
|
|
if k not in top_tree:
|
|
|
|
logger.info(f"Image Set Warning: {k} not found at https://github.com{repo}tree/master/{sub}")
|
|
|
|
logger.info(f"Image Set Warning: {k} not found at https://github.com{repo}tree/master/{sub}")
|
|
|
|
continue
|
|
|
|
continue
|
|
|
@ -1300,42 +1311,42 @@ class MetadataFile(DataFile):
|
|
|
|
seasons[season_num] = season_data
|
|
|
|
seasons[season_num] = season_data
|
|
|
|
if seasons:
|
|
|
|
if seasons:
|
|
|
|
item_data["seasons"] = seasons
|
|
|
|
item_data["seasons"] = seasons
|
|
|
|
image_sets[k] = item_data
|
|
|
|
style_data[k] = item_data
|
|
|
|
|
|
|
|
|
|
|
|
self.library.image_sets[set_id] = image_sets
|
|
|
|
self.library.image_styles[style_id] = style_data
|
|
|
|
|
|
|
|
|
|
|
|
if set_name and set_name in self.set_collections and "collections" in top_tree:
|
|
|
|
if set_key and set_key in self.set_collections and "collections" in top_tree:
|
|
|
|
collections_folder = self.config.GitHub.get_tree(top_tree["collections"]["url"])
|
|
|
|
collections_folder = self.config.GitHub.get_tree(top_tree["collections"]["url"])
|
|
|
|
for k, alts in self.set_collections[set_name].items():
|
|
|
|
for k, alts in self.set_collections[set_key].items():
|
|
|
|
if k in collections_folder:
|
|
|
|
if k in collections_folder:
|
|
|
|
collection_data = init_set(f"collections/{k}", self.config.GitHub.get_tree(collections_folder[k]["url"]))
|
|
|
|
collection_data = init_set(f"collections/{k}", self.config.GitHub.get_tree(collections_folder[k]["url"]))
|
|
|
|
self.library.collection_images[k] = collection_data
|
|
|
|
self.library.collection_images[k] = collection_data
|
|
|
|
for alt in alts:
|
|
|
|
for alt in alts:
|
|
|
|
self.library.collection_images[alt] = collection_data
|
|
|
|
self.library.collection_images[alt] = collection_data
|
|
|
|
elif set_id not in self.library.image_sets:
|
|
|
|
else:
|
|
|
|
files = util.load_files(set_data, "image_set", err_type=self.type_str, single=True)
|
|
|
|
files = util.load_files(style_file, "style_file", err_type=self.type_str, single=True)
|
|
|
|
if not files:
|
|
|
|
if not files:
|
|
|
|
raise Failed(f"{self.type_str} Error: No Path Found for image_set")
|
|
|
|
raise Failed(f"{self.type_str} Error: No Path Found for style_file")
|
|
|
|
file_type, set_file, _, _ = files[0]
|
|
|
|
file_type, style_path, _, _ = files[0]
|
|
|
|
folder_name = os.path.splitext(os.path.basename(self.path))[0]
|
|
|
|
temp_data = self.load_file(file_type, style_path, images=True, folder=f"{self.path}/styles/")
|
|
|
|
temp_data = self.load_file(file_type, set_file, images=True, folder=f"{folder_name}-sets/")
|
|
|
|
item_attr = "movies" if self.library.is_movie else "shows"
|
|
|
|
if "set" not in temp_data:
|
|
|
|
|
|
|
|
raise Failed('Image Set Error: Image sets must use the base attribute "set"')
|
|
|
|
|
|
|
|
if not isinstance(temp_data, dict):
|
|
|
|
if not isinstance(temp_data, dict):
|
|
|
|
raise Failed("Image Set Error: Image set must be a dictionary")
|
|
|
|
raise Failed("Image Style Error: base must be a dictionary")
|
|
|
|
if not temp_data["set"]:
|
|
|
|
if item_attr not in temp_data:
|
|
|
|
raise Failed("Image Set Error: Image set attribute is empty")
|
|
|
|
raise Failed(f"Image Style Error: Image Styles must use the base attribute {item_attr}")
|
|
|
|
if not isinstance(temp_data["set"], dict):
|
|
|
|
if not temp_data[item_attr]:
|
|
|
|
raise Failed("Image Set Error: Image set set attribute must be a dictionary")
|
|
|
|
raise Failed(f"Image Style Error: {item_attr} attribute is empty")
|
|
|
|
self.library.image_sets[set_id] = temp_data["set"]
|
|
|
|
if not isinstance(temp_data[item_attr], dict):
|
|
|
|
if set_name and set_name in self.set_collections and "collections" in temp_data and temp_data["collections"]:
|
|
|
|
raise Failed(f"Image Style Error: {item_attr} attribute must be a dictionary")
|
|
|
|
for k, alts in self.set_collections[set_name].items():
|
|
|
|
self.library.image_styles[style_id] = temp_data[item_attr]
|
|
|
|
|
|
|
|
if set_key and set_key in self.set_collections and "collections" in temp_data and temp_data["collections"]:
|
|
|
|
|
|
|
|
for k, alts in self.set_collections[set_key].items():
|
|
|
|
if k in temp_data["collections"]:
|
|
|
|
if k in temp_data["collections"]:
|
|
|
|
self.library.collection_images[k] = temp_data["collections"][k]
|
|
|
|
self.library.collection_images[k] = temp_data["collections"][k]
|
|
|
|
if alts:
|
|
|
|
if alts:
|
|
|
|
for alt in alts:
|
|
|
|
for alt in alts:
|
|
|
|
self.library.collection_images[alt] = temp_data["collections"][k]
|
|
|
|
self.library.collection_images[alt] = temp_data["collections"][k]
|
|
|
|
return self.library.image_sets[set_id]
|
|
|
|
return self.library.image_styles[style_id]
|
|
|
|
|
|
|
|
|
|
|
|
def get_collections(self, requested_collections):
|
|
|
|
def get_collections(self, requested_collections):
|
|
|
|
if requested_collections:
|
|
|
|
if requested_collections:
|
|
|
@ -1708,26 +1719,12 @@ class MetadataFile(DataFile):
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
logger.error(f"{mapping_name} Advanced Details Update Failed")
|
|
|
|
logger.error(f"{mapping_name} Advanced Details Update Failed")
|
|
|
|
|
|
|
|
|
|
|
|
image_set_data = None
|
|
|
|
style_data = None
|
|
|
|
if "image_set" in methods:
|
|
|
|
if "style_data" in methods:
|
|
|
|
logger.debug("")
|
|
|
|
style_data = meta[methods["style_data"]]
|
|
|
|
logger.debug("Validating Method: image_set")
|
|
|
|
logger.trace(f"Style Data: {style_data}")
|
|
|
|
set_files = meta[methods["image_set"]]
|
|
|
|
|
|
|
|
if not set_files:
|
|
|
|
asset_location, folder_name, ups = self.library.item_images(item, meta, methods, initial=True, asset_directory=self.asset_directory + self.library.asset_directory if self.asset_directory else None, style_data=style_data)
|
|
|
|
raise Failed(f"{self.type_str} Error: image_set attribute is blank")
|
|
|
|
|
|
|
|
logger.debug(f"Value: {set_files}")
|
|
|
|
|
|
|
|
set_dict = set_files[0] if isinstance(set_files, list) else set_files
|
|
|
|
|
|
|
|
if not isinstance(set_dict, dict):
|
|
|
|
|
|
|
|
raise Failed(f"{self.type_str} Error: No image_set path dictionary found")
|
|
|
|
|
|
|
|
elif not set_dict:
|
|
|
|
|
|
|
|
raise Failed(f"{self.type_str} Error: image_set path dictionary is empty")
|
|
|
|
|
|
|
|
image_set_data = self.get_image_set(set_dict, meta[methods["set"]] if "set" in methods else None)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
main_set_data = None
|
|
|
|
|
|
|
|
if image_set_data and mapping_name in image_set_data:
|
|
|
|
|
|
|
|
main_set_data = image_set_data[mapping_name]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
asset_location, folder_name, ups = self.library.item_images(item, meta, methods, initial=True, asset_directory=self.asset_directory + self.library.asset_directory if self.asset_directory else None, image_set=main_set_data)
|
|
|
|
|
|
|
|
if ups:
|
|
|
|
if ups:
|
|
|
|
updated = True
|
|
|
|
updated = True
|
|
|
|
logger.info(f"{self.library.type}: {mapping_name} Details Update {'Complete' if updated else 'Not Needed'}")
|
|
|
|
logger.info(f"{self.library.type}: {mapping_name} Details Update {'Complete' if updated else 'Not Needed'}")
|
|
|
@ -1780,7 +1777,7 @@ class MetadataFile(DataFile):
|
|
|
|
logger.error(f"{self.type_str} Error: Season: {season_id} not found")
|
|
|
|
logger.error(f"{self.type_str} Error: Season: {season_id} not found")
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
season_methods = {sm.lower(): sm for sm in season_dict}
|
|
|
|
season_methods = {sm.lower(): sm for sm in season_dict}
|
|
|
|
season_image_set = None
|
|
|
|
season_style_data = None
|
|
|
|
if update_seasons:
|
|
|
|
if update_seasons:
|
|
|
|
#season.batchEdits()
|
|
|
|
#season.batchEdits()
|
|
|
|
add_edit("title", season, season_dict, season_methods)
|
|
|
|
add_edit("title", season, season_dict, season_methods)
|
|
|
@ -1789,12 +1786,12 @@ class MetadataFile(DataFile):
|
|
|
|
if self.edit_tags("label", season, season_dict, season_methods):
|
|
|
|
if self.edit_tags("label", season, season_dict, season_methods):
|
|
|
|
updated = True
|
|
|
|
updated = True
|
|
|
|
finish_edit(season, f"Season: {season_id}")
|
|
|
|
finish_edit(season, f"Season: {season_id}")
|
|
|
|
if main_set_data and "seasons" in main_set_data and main_set_data["seasons"] and season_id in main_set_data["seasons"]:
|
|
|
|
if style_data and "seasons" in style_data and style_data["seasons"] and season_id in style_data["seasons"]:
|
|
|
|
season_image_set = main_set_data["seasons"][season_id]
|
|
|
|
season_style_data = style_data["seasons"][season_id]
|
|
|
|
_, _, ups = self.library.item_images(season, season_dict, season_methods, asset_location=asset_location,
|
|
|
|
_, _, ups = self.library.item_images(season, season_dict, season_methods, asset_location=asset_location,
|
|
|
|
title=f"{item.title} Season {season.seasonNumber}",
|
|
|
|
title=f"{item.title} Season {season.seasonNumber}",
|
|
|
|
image_name=f"Season{'0' if season.seasonNumber < 10 else ''}{season.seasonNumber}",
|
|
|
|
image_name=f"Season{'0' if season.seasonNumber < 10 else ''}{season.seasonNumber}",
|
|
|
|
folder_name=folder_name, image_set=season_image_set)
|
|
|
|
folder_name=folder_name, style_data=season_style_data)
|
|
|
|
if ups:
|
|
|
|
if ups:
|
|
|
|
updated = True
|
|
|
|
updated = True
|
|
|
|
logger.info(f"Season {season_id} of {mapping_name} Details Update {'Complete' if updated else 'Not Needed'}")
|
|
|
|
logger.info(f"Season {season_id} of {mapping_name} Details Update {'Complete' if updated else 'Not Needed'}")
|
|
|
@ -1839,13 +1836,13 @@ class MetadataFile(DataFile):
|
|
|
|
if self.edit_tags(tag_edit, episode, episode_dict, episode_methods):
|
|
|
|
if self.edit_tags(tag_edit, episode, episode_dict, episode_methods):
|
|
|
|
updated = True
|
|
|
|
updated = True
|
|
|
|
finish_edit(episode, f"Episode: {episode_id} in Season: {season_id}")
|
|
|
|
finish_edit(episode, f"Episode: {episode_id} in Season: {season_id}")
|
|
|
|
episode_image_set = None
|
|
|
|
episode_style_data = None
|
|
|
|
if season_image_set and "episodes" in season_image_set and season_image_set["episodes"] and episode_id in season_image_set["episodes"]:
|
|
|
|
if season_style_data and "episodes" in season_style_data and season_style_data["episodes"] and episode_id in season_style_data["episodes"]:
|
|
|
|
episode_image_set = season_image_set["episodes"][episode_id]
|
|
|
|
episode_style_data = season_style_data["episodes"][episode_id]
|
|
|
|
_, _, ups = self.library.item_images(episode, episode_dict, episode_methods, asset_location=asset_location,
|
|
|
|
_, _, ups = self.library.item_images(episode, episode_dict, episode_methods, asset_location=asset_location,
|
|
|
|
title=f"{item.title} {episode.seasonEpisode.upper()}",
|
|
|
|
title=f"{item.title} {episode.seasonEpisode.upper()}",
|
|
|
|
image_name=episode.seasonEpisode.upper(), folder_name=folder_name,
|
|
|
|
image_name=episode.seasonEpisode.upper(), folder_name=folder_name,
|
|
|
|
image_set=episode_image_set)
|
|
|
|
style_data=episode_style_data)
|
|
|
|
if ups:
|
|
|
|
if ups:
|
|
|
|
updated = True
|
|
|
|
updated = True
|
|
|
|
logger.info(f"Episode {episode_id} in Season {season_id} of {mapping_name} Details Update {'Complete' if updated else 'Not Needed'}")
|
|
|
|
logger.info(f"Episode {episode_id} in Season {season_id} of {mapping_name} Details Update {'Complete' if updated else 'Not Needed'}")
|
|
|
|