[20] small fixes

This commit is contained in:
meisnate12 2022-03-22 16:06:59 -04:00
parent c290a08ea4
commit b4165ac9ad
4 changed files with 12 additions and 6 deletions

View file

@ -15,7 +15,7 @@ jobs:
- name: Send Discord Commit Notification
uses: meisnate12/discord-notifications@master
with:
webhook_id: ${{ secrets.BUILD_WEBHOOK_TOKEN }}
webhook_id: ${{ secrets.BUILD_WEBHOOK_ID }}
webhook_token: ${{ secrets.BUILD_WEBHOOK_TOKEN }}
title: Plex Meta Manager Nightly Push
commits: "true"

View file

@ -1 +1 @@
1.16.2-develop19
1.16.2-develop20

View file

@ -1583,10 +1583,13 @@ class CollectionBuilder:
if "limit" in filter_alias:
if plex_filter[filter_alias["limit"]] is None:
raise Failed(f"{self.Type} Error: limit attribute is blank")
if not isinstance(plex_filter[filter_alias["limit"]], int) or plex_filter[filter_alias["limit"]] < 1:
elif str(plex_filter[filter_alias["limit"]]).lower() == "all":
filter_details += "Limit: all\n"
elif not isinstance(plex_filter[filter_alias["limit"]], int) or plex_filter[filter_alias["limit"]] < 1:
raise Failed(f"{self.Type} Error: limit attribute must be an integer greater then 0")
limit = plex_filter[filter_alias["limit"]]
filter_details += f"Limit: {limit}\n"
else:
limit = plex_filter[filter_alias["limit"]]
filter_details += f"Limit: {limit}\n"
validate = True
if "validate" in filter_alias:

View file

@ -464,7 +464,10 @@ def parse(error, attribute, data, datatype=None, methods=None, parent=None, defa
final_dict = {}
for dict_key, dict_data in value.items():
if isinstance(dict_data, dict) and dict_data:
final_dict[dict_key] = dict_data
new_data = {}
for dict_data_key, dict_data_data in dict_data.items():
new_data[str(dict_data_key)] = dict_data_data
final_dict[dict_key] = new_data
else:
raise Failed(f"{error} Warning: {display} {dict_key} is not a dictionary")
return final_dict