From 9b0024e4aaa7dab7a60e2b8689af5c70bd0a9f2d Mon Sep 17 00:00:00 2001 From: bionel Date: Sat, 23 Sep 2017 23:34:59 +0300 Subject: refine FILTEROUT --- src/frontend/gui/sisyphus-gui.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/frontend/gui/sisyphus-gui.py b/src/frontend/gui/sisyphus-gui.py index 5f80d1d..1b3a53e 100755 --- a/src/frontend/gui/sisyphus-gui.py +++ b/src/frontend/gui/sisyphus-gui.py @@ -95,7 +95,7 @@ class Sisyphus(QtWidgets.QMainWindow): def loadDatabase(self): with sqlite3.connect('/var/lib/sisyphus/db/sisyphus.db') as db: cursor=db.cursor() - FILTEROUT = "'%" + "virtual" + "%'" + FILTEROUT = "AND cat NOT LIKE 'virtual'" cursor.execute('''SELECT a.category AS cat, a.name AS pn, @@ -107,8 +107,7 @@ class Sisyphus(QtWidgets.QMainWindow): ON a.category = i.category AND a.name = i.name AND a.slot = i.slot - WHERE %s LIKE %s %s - AND cat NOT LIKE %s + WHERE %s LIKE %s %s %s ''' % (Sisyphus.SEARCHFIELD, Sisyphus.SEARCHTERM, Sisyphus.SEARCHFILTER, FILTEROUT)) rows = cursor.fetchall() Sisyphus.PKGCOUNT = len(rows) -- cgit v1.2.3