From 1ad1068c8d4680ddc67989814a090983c6c98ced Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Mon, 16 Aug 2021 08:54:28 -0400 Subject: [PATCH] fix anilist_search --- modules/anilist.py | 2 +- modules/builder.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/anilist.py b/modules/anilist.py index 6e82d86c..a031d7c8 100644 --- a/modules/anilist.py +++ b/modules/anilist.py @@ -14,7 +14,7 @@ mod_searches = [ "episodes.gt", "episodes.gte", "episodes.lt", "episodes.lte", "duration.gt", "duration.gte", "duration.lt", "duration.lte", "score.gt", "score.gte", "score.lt", "score.lte", "popularity.gt", "popularity.gte", "popularity.lt", "popularity.lte" ] -no_mod_searches = ["search", "season", "year", "adult", "min_tag_percent"] +no_mod_searches = ["search", "season", "year", "adult", "min_tag_percent", "limit", "sort_by"] searches = mod_searches + no_mod_searches search_types = { "search": "String", "season": "MediaSeason", "seasonYear": "Int", "isAdult": "Boolean", "minimumTagRank": "Int", diff --git a/modules/builder.py b/modules/builder.py index 235cce03..b6780eaf 100644 --- a/modules/builder.py +++ b/modules/builder.py @@ -763,7 +763,7 @@ class CollectionBuilder: new_dictionary = {} for search_method, search_data in dict_data.items(): search_attr, modifier, search_final = self._split(search_method) - if search_data is None: + if search_attr not in ["season", "year"] and search_data is None: raise Failed(f"Collection Error: {method_name} {search_final} attribute is blank") elif search_final not in anilist.searches: raise Failed(f"Collection Error: {method_name} {search_final} attribute not supported")