Skip to content

Commit

Permalink
fix for #223 arr tags must be lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
meisnate12 committed May 1, 2021
1 parent 2ff46b3 commit 8add37d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions modules/radarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ def get_tags(self):
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()

Expand All @@ -78,7 +78,7 @@ def add_tmdb(self, tmdb_ids, **options):
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)
Expand Down
6 changes: 3 additions & 3 deletions modules/sonarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ def get_tags(self):
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()

Expand All @@ -101,7 +101,7 @@ def add_tvdb(self, tvdb_ids, **options):
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)
Expand Down

0 comments on commit 8add37d

Please sign in to comment.