[128] #1189 fix resolution error

pull/1340/head
meisnate12 2 years ago
parent e9848e385d
commit 2eafcac19e

@ -1 +1 @@
1.18.3-develop127
1.18.3-develop128

@ -60,6 +60,9 @@ external_templates:
final_vertical_offset:
default: <<vertical_offset>>
conditions:
- type: edition_dovetail
vertical_align: "bottom"
value: <<vertical_offset>>
- type: edition_dovetail
value: <<vertical_offset+64>>
- type: resolution_dovetail

@ -24,7 +24,7 @@ class Overlays:
os.makedirs(self.library.overlay_backup, exist_ok=True)
key_to_overlays = {}
properties = None
properties = {}
if not self.library.remove_overlays:
key_to_overlays, properties = self.compile_overlays()
ignore_list = [rk for rk in key_to_overlays]

@ -201,21 +201,23 @@ def pick_image(title, images, prioritize_assets, download_url_assets, item_dir,
logger.debug(f"Method: {i} {image_type.capitalize()}: {images[i]}")
if prioritize_assets and "asset_directory" in images:
return images["asset_directory"]
if download_url_assets and item_dir and ("image_set" in images or f"url_{image_type}" in images):
if "asset_directory" in images:
return images["asset_directory"]
else:
try:
return download_image(title, images[f"url_{image_type}"], item_dir, image_name)
except Failed as e:
logger.error(e)
for attr in ["image_set", f"url_{image_type}", f"file_{image_type}", f"tmdb_{image_type}", "tmdb_profile",
"tmdb_list_poster", "tvdb_list_poster", f"tvdb_{image_type}", "asset_directory", "tmdb_person",
"tmdb_collection_details", "tmdb_actor_details", "tmdb_crew_details", "tmdb_director_details",
"tmdb_producer_details", "tmdb_writer_details", "tmdb_movie_details", "tmdb_list_details",
"tvdb_list_details", "tvdb_movie_details", "tvdb_show_details", "tmdb_show_details"]:
if attr in images:
return images[attr] if attr == "asset_directory" else ImageData(attr, images[attr], is_poster=is_poster, is_url=attr != f"file_{image_type}")
if attr in ["image_set", f"url_{image_type}"] and download_url_assets and item_dir:
if "asset_directory" in images:
return images["asset_directory"]
else:
try:
return download_image(title, images[attr], item_dir, image_name)
except Failed as e:
logger.error(e)
if attr == "asset_directory":
return images[attr]
return ImageData(attr, images[attr], is_poster=is_poster, is_url=attr != f"file_{image_type}")
def add_dict_list(keys, value, dict_map):
for key in keys:

Loading…
Cancel
Save