[18] fix *arr_taglist

pull/961/head
meisnate12 3 years ago
parent 397621df3a
commit 069d5a23bf

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

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

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

Loading…
Cancel
Save