From 40a0b024e5a1f6fcb6777cb514fbcab5df902dbd Mon Sep 17 00:00:00 2001 From: Chaz Larson Date: Sat, 22 Jul 2023 05:09:33 +0000 Subject: [PATCH 1/3] radarr/sonarr_remove_by_tag are str not bool --- modules/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/config.py b/modules/config.py index 8b12e638..b699fc76 100644 --- a/modules/config.py +++ b/modules/config.py @@ -99,7 +99,7 @@ mass_rating_options = { reset_overlay_options = {"tmdb": "Reset to TMDb poster", "plex": "Reset to Plex Poster"} library_operations = { "assets_for_all": "bool", "split_duplicates": "bool", "update_blank_track_titles": "bool", "remove_title_parentheses": "bool", - "radarr_add_all_existing": "bool", "radarr_remove_by_tag": "bool", "sonarr_add_all_existing": "bool", "sonarr_remove_by_tag": "bool", + "radarr_add_all_existing": "bool", "radarr_remove_by_tag": "str", "sonarr_add_all_existing": "bool", "sonarr_remove_by_tag": "str", "mass_genre_update": mass_genre_options, "mass_content_rating_update": mass_content_options, "mass_studio_update": mass_studio_options, "mass_audience_rating_update": mass_rating_options, "mass_episode_audience_rating_update": mass_episode_rating_options, "mass_critic_rating_update": mass_rating_options, "mass_episode_critic_rating_update": mass_episode_rating_options, From 2447637b8e1ae826ae44757efc0cea30e4385609 Mon Sep 17 00:00:00 2001 From: Chaz Larson Date: Sat, 22 Jul 2023 05:39:21 +0000 Subject: [PATCH 2/3] Only movies and shows have locations --- modules/builder.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/builder.py b/modules/builder.py index dd080af3..183d664a 100644 --- a/modules/builder.py +++ b/modules/builder.py @@ -2853,7 +2853,12 @@ class CollectionBuilder: if "item_edition" in self.item_details and item.editionTitle != self.item_details["item_edition"]: self.library.query_data(item.editEditionTitle, self.item_details["item_edition"]) logger.info(f"{item.title[:25]:<25} | Edition | {self.item_details['item_edition']}") - path = os.path.dirname(str(item.locations[0])) if self.library.is_movie else str(item.locations[0]) + path = None + if self.library.is_movie: + path = os.path.dirname(str(item.locations[0])) + elif self.library.is_show: + path = str(item.locations[0]) + if self.library.Radarr and item.ratingKey in self.library.movie_rating_key_map: path = path.replace(self.library.Radarr.plex_path, self.library.Radarr.radarr_path) path = path[:-1] if path.endswith(('/', '\\')) else path From d1883fe21ecec2525446e35d5f7c6a390c722da8 Mon Sep 17 00:00:00 2001 From: Chaz Larson Date: Sat, 22 Jul 2023 05:43:17 +0000 Subject: [PATCH 3/3] Revert "Only movies and shows have locations" This reverts commit 2447637b8e1ae826ae44757efc0cea30e4385609. --- modules/builder.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/modules/builder.py b/modules/builder.py index 183d664a..dd080af3 100644 --- a/modules/builder.py +++ b/modules/builder.py @@ -2853,12 +2853,7 @@ class CollectionBuilder: if "item_edition" in self.item_details and item.editionTitle != self.item_details["item_edition"]: self.library.query_data(item.editEditionTitle, self.item_details["item_edition"]) logger.info(f"{item.title[:25]:<25} | Edition | {self.item_details['item_edition']}") - path = None - if self.library.is_movie: - path = os.path.dirname(str(item.locations[0])) - elif self.library.is_show: - path = str(item.locations[0]) - + path = os.path.dirname(str(item.locations[0])) if self.library.is_movie else str(item.locations[0]) if self.library.Radarr and item.ratingKey in self.library.movie_rating_key_map: path = path.replace(self.library.Radarr.plex_path, self.library.Radarr.radarr_path) path = path[:-1] if path.endswith(('/', '\\')) else path