From e2e3097b925b13c2237884fe9f7a16ebe07a16b3 Mon Sep 17 00:00:00 2001 From: ricoloic Date: Thu, 1 Aug 2024 19:19:36 -0400 Subject: [PATCH] fix: issues with input_id being a list --- CHANGELOG | 1 + modules/builder.py | 33 +++++++++++++++++++++++---------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 1c458031f..de76da738 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -20,5 +20,6 @@ Fixed multiple anime `int()` Errors Fixed #2100 `verify_ssl` wasn't working when downloading images Fixed an issue with `delete_collections` where items were being deleted if they only matched one criteria vs all criteria Fixed `imdb_watchlist` +Fixes #2135 AniDB Builder type conversion error Various other Minor Fixes diff --git a/modules/builder.py b/modules/builder.py index ddb51c82d..6736ffcf0 100644 --- a/modules/builder.py +++ b/modules/builder.py @@ -2290,16 +2290,29 @@ def filter_and_save_items(self, ids): logger.warning(e) continue elif id_type == "tmdb" and not self.parts_collection: - input_id = int(input_id) - if input_id not in self.ignore_ids: - found = False - for pl_library in self.libraries: - if input_id in pl_library.movie_map: - found = True - rating_keys = pl_library.movie_map[input_id] - break - if not found and input_id not in self.missing_movies: - self.missing_movies.append(input_id) + if isinstance(input_id, list): + for a_id in input_id: + input_id = int(a_id) + if input_id not in self.ignore_ids: + found = False + for pl_library in self.libraries: + if input_id in pl_library.movie_map: + found = True + rating_keys = pl_library.movie_map[input_id] + break + if not found and input_id not in self.missing_movies: + self.missing_movies.append(input_id) + else: + input_id = int(input_id) + if input_id not in self.ignore_ids: + found = False + for pl_library in self.libraries: + if input_id in pl_library.movie_map: + found = True + rating_keys = pl_library.movie_map[input_id] + break + if not found and input_id not in self.missing_movies: + self.missing_movies.append(input_id) elif id_type == "tvdb_season" and (self.builder_level == "season" or self.playlist): tvdb_id, season_num = input_id.split("_") tvdb_id = int(tvdb_id)