|
|
|
@ -2854,13 +2854,14 @@ class CollectionBuilder:
|
|
|
|
|
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 item.locations:
|
|
|
|
|
if self.library.is_movie:
|
|
|
|
|
path = os.path.dirname(str(item.locations[0]))
|
|
|
|
|
elif self.library.is_show:
|
|
|
|
|
path = str(item.locations[0])
|
|
|
|
|
if not path:
|
|
|
|
|
logger.error(f"Plex Error: No location found for {item.title}: {item.locations}")
|
|
|
|
|
if "item_radarr_tag" in self.item_details or self.radarr_details["add_existing"] or "item_sonarr_tag" in self.item_details or self.sonarr_details["add_existing"]:
|
|
|
|
|
if item.locations:
|
|
|
|
|
if self.library.is_movie:
|
|
|
|
|
path = os.path.dirname(str(item.locations[0]))
|
|
|
|
|
elif self.library.is_show:
|
|
|
|
|
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
|
|
|
|
|