diff --git a/CHANGELOG b/CHANGELOG index 81fa9c4b..0d7bcd11 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -12,5 +12,6 @@ Changed the `overlay_artwork_filetype` Setting to accept `webp_lossy` and `webp_ # Defaults # Bug Fixes +Fixes #2034 `anilist_userlist` `score` attribute wasn't being validated correctly Various other Minor Fixes \ No newline at end of file diff --git a/VERSION b/VERSION index aee321a4..c7298f06 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.1-develop15 +2.0.1-develop16 diff --git a/modules/anilist.py b/modules/anilist.py index b92d0f87..99525e78 100644 --- a/modules/anilist.py +++ b/modules/anilist.py @@ -241,7 +241,7 @@ class AniList: variables = {"user": username, "sort": userlist_sort_options[sort_by]} for alist in self._request(query, variables)["data"]["MediaListCollection"]["lists"]: if alist["name"] == list_name: - return [m["media"]["id"] for m in alist["entries"] if not score or not any([util.is_number_filter(value, mod, m["score"]) for mod, value in score.items()])] + return [m["media"]["id"] for m in alist["entries"] if not score or not any([util.is_number_filter(m["score"], mod, value) for mod, value in score.items()])] return [] def validate_userlist(self, data): diff --git a/modules/builder.py b/modules/builder.py index 96661430..90980273 100644 --- a/modules/builder.py +++ b/modules/builder.py @@ -1412,8 +1412,8 @@ class CollectionBuilder: score_dict = {} for search_method, search_data in dict_data.items(): search_attr, modifier = os.path.splitext(str(search_method).lower()) - if search_attr == "score" and modifier in ["gt", "gte", "lt", "lte"]: - score = util.parse(self.Type, search_method, dict_data, datatype="int", default=-1, minimum=0, maximum=10, parent=method_name) + if search_attr == "score" and modifier in [".gt", ".gte", ".lt", ".lte"]: + score = util.parse(self.Type, search_method, dict_data, methods=dict_methods, datatype="int", default=-1, minimum=0, maximum=10, parent=method_name) if score > -1: score_dict[modifier] = score elif search_attr not in ["username", "list_name", "sort_by"]: