From 06ae1be38cd4f2d6da09b3f21e282654e2fc9bc8 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Wed, 26 Jul 2023 08:23:52 -0400 Subject: [PATCH] [79] update location check --- VERSION | 2 +- modules/builder.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 8a460772..ba2a4922 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.19.0-develop78 +1.19.0-develop79 diff --git a/modules/builder.py b/modules/builder.py index 77092789..e43dad46 100644 --- a/modules/builder.py +++ b/modules/builder.py @@ -2857,12 +2857,14 @@ class CollectionBuilder: if self.library.is_movie: path = os.path.dirname(str(item.locations[0])) elif self.library.is_show: - str(item.locations[0]) - if self.library.Radarr and item.ratingKey in self.library.movie_rating_key_map: + path = str(item.locations[0]) + if not path: + logger.error(f"Plex Error: No location found for {item.title}: {item.locations}") + if path and 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 tmdb_paths.append((self.library.movie_rating_key_map[item.ratingKey], path)) - if self.library.Sonarr and item.ratingKey in self.library.show_rating_key_map: + if path and self.library.Sonarr and item.ratingKey in self.library.show_rating_key_map: path = path.replace(self.library.Sonarr.plex_path, self.library.Sonarr.sonarr_path) path = path[:-1] if path.endswith(('/', '\\')) else path tvdb_paths.append((self.library.show_rating_key_map[item.ratingKey], path))