mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-10 06:54:21 +00:00
[129] change how default works
This commit is contained in:
parent
2eafcac19e
commit
f8f3ccbb3a
3 changed files with 8 additions and 5 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
1.18.3-develop128
|
1.18.3-develop129
|
||||||
|
|
|
@ -633,19 +633,21 @@ class MetadataFile(DataFile):
|
||||||
styles = util.parse("Set Data", "styles", set_data["styles"], datatype="dictlist")
|
styles = util.parse("Set Data", "styles", set_data["styles"], datatype="dictlist")
|
||||||
if "default" not in styles:
|
if "default" not in styles:
|
||||||
raise Failed("Set Data styles attribute must have a default")
|
raise Failed("Set Data styles attribute must have a default")
|
||||||
|
if styles["default"] not in styles:
|
||||||
|
raise Failed(f"Set Data styles default style not found. Options: {', '.join([s for s in styles])}")
|
||||||
use_key = None
|
use_key = None
|
||||||
if f"use_{set_key}" in methods:
|
if f"use_{set_key}" in methods:
|
||||||
use_key = util.parse("Images", f"use_{set_key}", self.temp_vars, datatype="bool",methods=methods, default=False)
|
use_key = util.parse("Images", f"use_{set_key}", self.temp_vars, datatype="bool",methods=methods, default=False)
|
||||||
logger.info(f"Use {set_key}: {use_key}")
|
logger.info(f"Use {set_key}: {use_key}")
|
||||||
if use_key is False or (use_all is False and use_key is None):
|
if use_key is False or (use_all is False and use_key is None):
|
||||||
continue
|
continue
|
||||||
style = "default"
|
style = styles["default"]
|
||||||
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 = util.parse("Images", f"style_{set_key}", self.temp_vars, methods=methods, default=style)
|
||||||
logger.info(f"Style {set_key}: {style}")
|
logger.info(f"Style {set_key}: {style}")
|
||||||
if style not in styles:
|
if style not in styles:
|
||||||
logger.warning(f"Image Set Warning: {set_key} has no style: {style} using default. Options: {', '.join([s for s in styles])}")
|
logger.warning(f"Image Set Warning: {set_key} has no style: {style} using default: {styles['default']}. Options: {', '.join([s for s in styles])}")
|
||||||
style = "default"
|
style = styles["default"]
|
||||||
if "collections" in set_data and set_data["collections"]:
|
if "collections" in set_data and set_data["collections"]:
|
||||||
self.set_collections[set_key] = set_data["collections"]
|
self.set_collections[set_key] = set_data["collections"]
|
||||||
image_set = self.temp_vars[methods[f"set_file_{set_key}"]] if f"set_file_{set_key}" in methods else styles[style]
|
image_set = self.temp_vars[methods[f"set_file_{set_key}"]] if f"set_file_{set_key}" in methods else styles[style]
|
||||||
|
|
|
@ -19,6 +19,7 @@ class Webhooks:
|
||||||
logger.trace("")
|
logger.trace("")
|
||||||
logger.separator("Webhooks", space=False, border=False, trace=True)
|
logger.separator("Webhooks", space=False, border=False, trace=True)
|
||||||
logger.trace("")
|
logger.trace("")
|
||||||
|
json["library_mapping_name"] = self.library.mapping_name if self.library else ""
|
||||||
logger.trace(f"JSON: {json}")
|
logger.trace(f"JSON: {json}")
|
||||||
for webhook in list(set(webhooks)):
|
for webhook in list(set(webhooks)):
|
||||||
response = None
|
response = None
|
||||||
|
|
Loading…
Reference in a new issue