diff --git a/modules/radarr.py b/modules/radarr.py index b8b52e17..064682ce 100644 --- a/modules/radarr.py +++ b/modules/radarr.py @@ -52,9 +52,9 @@ class RadarrAPI: def add_tags(self, tags): added = False for label in tags: - if label not in self.tags: + if str(label).lower() not in self.tags: added = True - self.send_post("tag", {"label": str(label)}) + self.send_post("tag", {"label": str(label).lower()}) if added: self.tags = self.get_tags() @@ -78,7 +78,7 @@ class RadarrAPI: search = options["search"] if "search" in options else self.search if tags: self.add_tags(tags) - tag_nums = [self.tags[label] for label in tags if label in self.tags] + tag_nums = [self.tags[label.lower()] for label in tags if label.lower() in self.tags] for tmdb_id in tmdb_ids: try: movie_info = self.lookup(tmdb_id) diff --git a/modules/sonarr.py b/modules/sonarr.py index 38ff9e89..896b940c 100644 --- a/modules/sonarr.py +++ b/modules/sonarr.py @@ -72,9 +72,9 @@ class SonarrAPI: def add_tags(self, tags): added = False for label in tags: - if label not in self.tags: + if str(label).lower() not in self.tags: added = True - self.send_post("tag", {"label": str(label)}) + self.send_post("tag", {"label": str(label).lower()}) if added: self.tags = self.get_tags() @@ -101,7 +101,7 @@ class SonarrAPI: cutoff_search = options["cutoff_search"] if "cutoff_search" in options else self.cutoff_search if tags: self.add_tags(tags) - tag_nums = [self.tags[label] for label in tags if label in self.tags] + tag_nums = [self.tags[label.lower()] for label in tags if label.lower() in self.tags] for tvdb_id in tvdb_ids: try: show_info = self.lookup(tvdb_id)