From b4e28825b0733d4671fbfb35b378c6ff77bbc0f5 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Sun, 12 Sep 2021 23:25:30 -0400 Subject: [PATCH] #382 Fix anilist_search --- modules/anilist.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/anilist.py b/modules/anilist.py index ecad448b..c743cf91 100644 --- a/modules/anilist.py +++ b/modules/anilist.py @@ -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":