mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Enhance used and empty fields search with :false and :true instead of :none
This commit is contained in:
parent
840d567078
commit
4bf1a46acd
@ -213,7 +213,10 @@ 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':
|
||||
if query == 'false' and (not item[loc] or item[loc].strip() == ''):
|
||||
matches.add(item[0])
|
||||
break
|
||||
if query == 'true' and (item[loc] and item[loc].strip() != ''):
|
||||
matches.add(item[0])
|
||||
break
|
||||
if rating_query and item[loc] and loc == MAP['rating'] and rating_query == int(item[loc]):
|
||||
|
Loading…
x
Reference in New Issue
Block a user