From f6d8146fc0d39170cd4ddafc3c597f3840322ae3 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Wed, 11 Oct 2023 16:03:12 -0400 Subject: [PATCH] [11] fix smart collections --- VERSION | 2 +- modules/builder.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index 2f466777..0a2901b3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.19.1-develop10 +1.19.1-develop11 diff --git a/modules/builder.py b/modules/builder.py index e17ecac2..212859a0 100644 --- a/modules/builder.py +++ b/modules/builder.py @@ -1122,13 +1122,13 @@ class CollectionBuilder: if check_url != self.library.smart_filter(self.obj): self.library.update_smart_collection(self.obj, check_url) logger.info(f"Detail: Smart Collection updated to {check_url}") - self.beginning_count = len(self.library.fetchItems(check_url)) + self.beginning_count = len(self.library.fetchItems(check_url)) if check_url else 0 if self.obj: self.exists = True - col_items = self.library.get_collection_items(self.obj, self.smart_label_collection) - self.beginning_count = len(col_items) if self.smart or self.playlist else self.obj.childCount if self.sync or self.playlist: - self.remove_item_map = {i.ratingKey: i for i in col_items} + self.remove_item_map = {i.ratingKey: i for i in self.library.get_collection_items(self.obj, self.smart_label_collection)} + if not self.smart: + self.beginning_count = len(self.remove_item_map) if self.playlist else self.obj.childCount else: self.obj = None if self.sync: