From 3aa7697f1a4cca1f3194d36722f41cd861b25798 Mon Sep 17 00:00:00 2001 From: Gregory Riker Date: Wed, 19 Feb 2014 04:48:57 -0700 Subject: [PATCH] Fix for lp:1281296, multiple entries for books when processing multiple exclusion rules. --- src/calibre/library/catalogs/epub_mobi_builder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/library/catalogs/epub_mobi_builder.py b/src/calibre/library/catalogs/epub_mobi_builder.py index a846b95ac6..503a9081ab 100644 --- a/src/calibre/library/catalogs/epub_mobi_builder.py +++ b/src/calibre/library/catalogs/epub_mobi_builder.py @@ -4722,7 +4722,6 @@ class CatalogBuilder(object): Return: (list): filtered data_set """ - filtered_data_set = [] exclusion_pairs = [] exclusion_set = [] @@ -4773,7 +4772,8 @@ class CatalogBuilder(object): filtered_data_set.remove(record) break else: - filtered_data_set.append(record) + if record not in filtered_data_set: + filtered_data_set.append(record) else: if (record not in filtered_data_set and record not in exclusion_set):