From 4f0ca1264211dd0dd4ca4286500df8751d9c30de Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Sat, 4 Aug 2012 14:33:12 +0200 Subject: [PATCH] Fix isbn:false not matching if other identifiers are attached to the book. --- src/calibre/library/caches.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/calibre/library/caches.py b/src/calibre/library/caches.py index a516681fab..99470f3835 100644 --- a/src/calibre/library/caches.py +++ b/src/calibre/library/caches.py @@ -568,6 +568,7 @@ class ResultCache(SearchQueryParser): # {{{ matches.add(id_) continue + add_if_valq_false = valq == 'false' pairs = [p.strip() for p in item[loc].split(split_char)] for pair in pairs: parts = pair.split(':') @@ -583,10 +584,14 @@ class ResultCache(SearchQueryParser): # {{{ continue elif valq == 'false': if v: + add_if_valq_false = False continue elif not _match(valq, v, valq_mkind): continue matches.add(id_) + + if add_if_valq_false: + matches.add(id_) return matches def _matchkind(self, query):