mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-10 06:54:21 +00:00
fix for #118
This commit is contained in:
parent
de8f8a37ea
commit
6374d56859
1 changed files with 4 additions and 4 deletions
|
@ -358,12 +358,12 @@ class CollectionBuilder:
|
||||||
elif method_name in util.dictionary_lists:
|
elif method_name in util.dictionary_lists:
|
||||||
if isinstance(data[m], dict):
|
if isinstance(data[m], dict):
|
||||||
def get_int(parent, method, data_in, default_in, minimum=1, maximum=None):
|
def get_int(parent, method, data_in, default_in, minimum=1, maximum=None):
|
||||||
if method not in data_in: logger.warning(f"Collection Warning: {parent} {method} attribute not found using {default} as default")
|
if method not in data_in: logger.warning(f"Collection Warning: {parent} {method} attribute not found using {default_in} as default")
|
||||||
elif not data_in[method]: logger.warning(f"Collection Warning: {parent} {method} attribute is blank using {default} as default")
|
elif not data_in[method]: logger.warning(f"Collection Warning: {parent} {method} attribute is blank using {default_in} as default")
|
||||||
elif isinstance(data_in[method], int) and data_in[method] >= minimum:
|
elif isinstance(data_in[method], int) and data_in[method] >= minimum:
|
||||||
if maximum is None or data_in[method] <= maximum: return data_in[method]
|
if maximum is None or data_in[method] <= maximum: return data_in[method]
|
||||||
else: logger.warning(f"Collection Warning: {parent} {method} attribute {data_in[method]} invalid must an integer <= {maximum} using {default} as default")
|
else: logger.warning(f"Collection Warning: {parent} {method} attribute {data_in[method]} invalid must an integer <= {maximum} using {default_in} as default")
|
||||||
else: logger.warning(f"Collection Warning: {parent} {method} attribute {data_in[method]} invalid must an integer >= {minimum} using {default} as default")
|
else: logger.warning(f"Collection Warning: {parent} {method} attribute {data_in[method]} invalid must an integer >= {minimum} using {default_in} as default")
|
||||||
return default_in
|
return default_in
|
||||||
if method_name == "filters":
|
if method_name == "filters":
|
||||||
for f in data[m]:
|
for f in data[m]:
|
||||||
|
|
Loading…
Reference in a new issue