#382 Fix anilist_search

This commit is contained in:
meisnate12 2021-09-12 23:25:30 -04:00
parent 9190b30a47
commit b4e28825b0

View file

@ -120,7 +120,12 @@ class AniList:
if attr in ["start", "end"]:
value = int(util.validate_date(value, f"anilist_search {key}", return_as="%Y%m%d"))
elif attr in ["format", "status", "genre", "tag", "tag_category"]:
value = f"[{', '.join([self.options[attr.replace('_', ' ').title()][v.lower().replace(' / ', '-').replace(' ', '-')] for v in value])}]"
temp_value = [self.options[attr.replace('_', ' ').title()][v.lower().replace(' / ', '-').replace(' ', '-')] for v in value]
if attr in ["format", "status"]:
value = f"[{', '.join(temp_value)}]"
else:
temp = '", "'.join(temp_value)
value = f'["{temp}"]'
elif attr in ["season", "source", "country"]:
value = self.options[attr.replace("_", " ").title()][value]
if mod == "gte":