[18] fix *arr_taglist

This commit is contained in:
meisnate12 2022-07-12 02:45:53 -04:00
parent 397621df3a
commit 069d5a23bf
3 changed files with 5 additions and 3 deletions

View file

@ -1 +1 @@
1.17.1-develop17
1.17.1-develop18

View file

@ -221,6 +221,7 @@ class Radarr:
def get_tmdb_ids(self, method, data):
ids = []
allowed = [t.id for t in self.api.all_tags() if t.label.lower() in data] if method == "radarr_taglist" else []
for movie in self.api.all_movies():
append = False
if method == "radarr_all":
@ -228,7 +229,7 @@ class Radarr:
elif method == "radarr_taglist":
if data:
for tag in movie.tags:
if tag.label.lower() in data:
if tag.id in allowed:
append = True
break
elif not movie.tags:

View file

@ -247,6 +247,7 @@ class Sonarr:
def get_tvdb_ids(self, method, data):
ids = []
allowed = [t.id for t in self.api.all_tags() if t.label.lower() in data] if method == "sonarr_taglist" else []
for series in self.api.all_series():
append = False
if method == "sonarr_all":
@ -254,7 +255,7 @@ class Sonarr:
elif method == "sonarr_taglist":
if data:
for tag in series.tags:
if tag.label.lower() in data:
if tag.id in allowed:
append = True
break
elif not series.tags: