From af93849e6da2332c65cba77ec71712b42124ee2b Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Mon, 27 Feb 2023 13:37:23 -0500 Subject: [PATCH] [102] fix autoreload --- VERSION | 2 +- modules/builder.py | 2 +- modules/meta.py | 2 +- modules/plex.py | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index 74e06d02..027e3992 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.18.3-develop101 +1.18.3-develop102 diff --git a/modules/builder.py b/modules/builder.py index 5da649e8..ce9ab3d5 100644 --- a/modules/builder.py +++ b/modules/builder.py @@ -2618,7 +2618,7 @@ class CollectionBuilder: tmdb_paths = [] tvdb_paths = [] for item in self.items: - self.library.reload(item) + item = self.library.reload(item) current_labels = [la.tag for la in self.library.item_labels(item)] if "item_assets" in self.item_details and self.asset_directory and "Overlay" not in current_labels: self.library.find_and_upload_assets(item, current_labels, asset_directory=self.asset_directory) diff --git a/modules/meta.py b/modules/meta.py index 758e4477..f03477d6 100644 --- a/modules/meta.py +++ b/modules/meta.py @@ -1245,7 +1245,7 @@ class MetadataFile(DataFile): if not self.library.plex_pass: logger.warning("Plex Warning: Plex Pass is required to use the Edition Field scanning filenames instead") for i in item: - self.library.reload(i) + i = self.library.reload(i) if self.library.plex_pass: check = i.editionTitle if i.editionTitle else "" else: diff --git a/modules/plex.py b/modules/plex.py index abd6b671..da86c28e 100644 --- a/modules/plex.py +++ b/modules/plex.py @@ -658,7 +658,7 @@ class Plex(Library): def reload(self, item, force=False): is_full = False cached_item = item - if cached_item.ratingKey in self.cached_items: + if not force and cached_item.ratingKey in self.cached_items: cached_item, is_full = self.cached_items[cached_item.ratingKey] try: if not is_full or force: @@ -668,7 +668,7 @@ class Plex(Library): includeGeolocation=False, includeLoudnessRamps=False, includeMarkers=False, includeOnDeck=False, includePopularLeaves=False, includeRelated=False, includeRelatedCount=0, includeReviews=False, includeStations=False) - cached_item._initpath = cached_item._details_key + cached_item._autoReload = False self.cached_items[cached_item.ratingKey] = (cached_item, True) return cached_item except (BadRequest, NotFound) as e: