diff --git a/VERSION b/VERSION index d7e679e1a..81cd36c04 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.1.0-build73 +2.1.0-build74 diff --git a/modules/operations.py b/modules/operations.py index c54d434d9..93324d993 100644 --- a/modules/operations.py +++ b/modules/operations.py @@ -64,19 +64,15 @@ def run_operations(self): logger.debug(f"Item Operation: {self.library.items_library_operation}") logger.debug("") - def should_be_deleted(col_in, labels_in, configured_in, managed_in, less_in, ignore_smart_in): + def should_be_deleted(col_in, labels_in, configured_in, managed_in, less_in): if all((x is None for x in [configured_in, managed_in, less_in])): return False - less_check = not ignore_smart_in if col_in.smart else True + less_check = True if less_in is not None: - if less_check: - col_count = col_in.childCount if col_in.childCount is not None else 0 - less_check = col_count < less_in - logger.trace(f"{col_in.title} - collection size: {col_count} < less: {less_in}, DELETE: {less_check}") - else: - logger.trace(f"{col_in.title} - skipping size check: smart - {col_in.smart}, ignore_smart - {ignore_smart_in}") - + col_count = col_in.childCount if col_in.childCount is not None else 0 + less_check = col_count < less_in + logger.trace(f"{col_in.title} - collection size: {col_count} < less: {less_in}, DELETE: {less_check}") managed_check = True if managed_in is not None: @@ -1133,7 +1129,7 @@ def get_batch_info(placement, total, display_attr, total_count, display_value=No col = self.library.reload(col, force=True) labels = [la.tag for la in self.library.item_labels(col)] - if should_be_deleted(col, labels, configured, managed, less, ignore_smart): + if should_be_deleted(col, labels, configured, managed, None if col.smart and ignore_smart else less): try: self.library.delete(col) logger.info(f"{col.title} Deleted")