summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbionel <ionel.busuioc@gmail.com>2017-09-23 23:34:59 +0300
committerbionel <ionel.busuioc@gmail.com>2017-09-23 23:34:59 +0300
commit9b0024e4aaa7dab7a60e2b8689af5c70bd0a9f2d (patch)
tree8d6876e39cc26c97e2540a50913b92d00d383e99 /src
parente3267acaf3c7650caa7504c023aaebffe424269b (diff)
refine FILTEROUT
Diffstat (limited to 'src')
-rwxr-xr-xsrc/frontend/gui/sisyphus-gui.py5
1 files changed, 2 insertions, 3 deletions
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)