fix anilist_search

pull/368/head
meisnate12 3 years ago
parent f727068317
commit 1ad1068c8d

@ -14,7 +14,7 @@ mod_searches = [
"episodes.gt", "episodes.gte", "episodes.lt", "episodes.lte", "duration.gt", "duration.gte", "duration.lt", "duration.lte", "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" "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 searches = mod_searches + no_mod_searches
search_types = { search_types = {
"search": "String", "season": "MediaSeason", "seasonYear": "Int", "isAdult": "Boolean", "minimumTagRank": "Int", "search": "String", "season": "MediaSeason", "seasonYear": "Int", "isAdult": "Boolean", "minimumTagRank": "Int",

@ -763,7 +763,7 @@ class CollectionBuilder:
new_dictionary = {} new_dictionary = {}
for search_method, search_data in dict_data.items(): for search_method, search_data in dict_data.items():
search_attr, modifier, search_final = self._split(search_method) 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") raise Failed(f"Collection Error: {method_name} {search_final} attribute is blank")
elif search_final not in anilist.searches: elif search_final not in anilist.searches:
raise Failed(f"Collection Error: {method_name} {search_final} attribute not supported") raise Failed(f"Collection Error: {method_name} {search_final} attribute not supported")

Loading…
Cancel
Save