From 7e493d1b01abb73d15211a582f78c50a53962dad Mon Sep 17 00:00:00 2001 From: John Schember Date: Mon, 29 Jun 2009 07:05:47 -0400 Subject: [PATCH] Search for empty fields using location:none. --- src/calibre/library/database2.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/library/database2.py b/src/calibre/library/database2.py index 3550253ffa..1f52f55526 100644 --- a/src/calibre/library/database2.py +++ b/src/calibre/library/database2.py @@ -208,6 +208,9 @@ class ResultCache(SearchQueryParser): for item in self._data: if item is None: continue for loc in location: + if (not item[loc] or item[loc] == [] or item[loc] == 0 or item[loc] == '') and query == 'none': + matches.add(item[0]) + break if item[loc] and query in item[loc].lower(): matches.add(item[0]) break