From d9e5ac9a05d52fbe174bdfb0cc8102600369ace8 Mon Sep 17 00:00:00 2001 From: GRiker Date: Fri, 12 Feb 2010 11:11:23 -0700 Subject: [PATCH] GR tweaks anticipating exact search --- src/calibre/library/catalog.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/calibre/library/catalog.py b/src/calibre/library/catalog.py index 7d7421c601..91e10b757e 100644 --- a/src/calibre/library/catalog.py +++ b/src/calibre/library/catalog.py @@ -900,9 +900,7 @@ class EPUB_MOBI(CatalogPlugin): self.opts.sort_by = 'title' - # Merge opts.exclude_tag with opts.search_text - - # What if no exclude tags? + # Merge opts.exclude_tags with opts.search_text empty_exclude_tags = False if len(self.opts.exclude_tags) else True search_phrase = '' if not empty_exclude_tags: @@ -910,6 +908,7 @@ class EPUB_MOBI(CatalogPlugin): search_terms = [] for tag in exclude_tags: search_terms.append("tag:%s" % tag) + #search_terms.append("tag:=%s" % tag) search_phrase = "not (%s)" % " or ".join(search_terms) # If a list of ids are provided, don't use search_text