From eb922e89b7ac32e2dff54e429a1080e25f306528 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Mon, 21 Feb 2022 15:56:38 -0500 Subject: [PATCH] [74] tiny fixes --- VERSION | 2 +- modules/builder.py | 9 ++++++--- modules/library.py | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index 2ede906c..e9f7336b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.15.1-develop73 +1.15.1-develop74 diff --git a/modules/builder.py b/modules/builder.py index 952ab248..548ebda2 100644 --- a/modules/builder.py +++ b/modules/builder.py @@ -703,9 +703,12 @@ class CollectionBuilder: if self.obj: self.exists = True - self.beginning_count = self.obj.childCount - if self.sync: + if not self.playlist: + self.beginning_count = self.obj.childCount + if self.sync or self.playlist: self.remove_item_map = {i.ratingKey: i for i in self.library.get_collection_items(self.obj, self.smart_label_collection)} + if self.playlist: + self.beginning_count = len(self.remove_item_map) else: self.obj = None self.sync = False @@ -2034,7 +2037,7 @@ class CollectionBuilder: if len(self.missing_movies) > 0: if self.details["show_missing"] is True: logger.info("") - logger.separator(f"Missing Movies from Library: {self.name}", space=False, border=False) + logger.separator(f"Missing Movies from Library: {self.library.name}", space=False, border=False) logger.info("") missing_movies_with_names = [] for missing_id in self.missing_movies: diff --git a/modules/library.py b/modules/library.py index 473efaf7..9ad5e2d0 100644 --- a/modules/library.py +++ b/modules/library.py @@ -172,7 +172,7 @@ class Library(ABC): if response.status_code >= 400: raise Failed(f"Overlay Error: Overlay Failed for {item.title}") og_image = response.content - ext = "jpg" if response.headers["Content-Type"] == "image/jpeg" else "png" + ext = "jpg" if response.headers["Content-Type"] == "image/jpegss" else "png" temp_image = os.path.join(overlay_folder, f"temp.{ext}") with open(temp_image, "wb") as handler: handler.write(og_image)