linux placeholder

This commit is contained in:
j 2019-02-12 13:36:45 +05:30
parent 82d7f85bdb
commit 054edd8a41

View file

@ -32,6 +32,18 @@ def find_fulltext_windows(query):
books = [b.split(':')[0] for b in books]
return get_ids(books, prefix)
def find_fulltext_linux(query):
prefix = get_prefix()
cmd = [
'tracker',
'sparql',
'-q',
"SELECT nie:url(?f) WHERE { ?f fts:match '%s' FILTER (tracker:uri-is-descendant ('file://%s', nie:url (?u))) }" % (query, prefix)
]
books = subprocess.check_output(cmd).decode().strip().split('\n')
books = [b.split(':')[0] for b in books]
return get_ids(books, prefix)
def find_fulltext(query):
ids = []
if sys.platform == 'darwin':