diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-04-02 20:30:43 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-04-02 20:30:43 +0100 |
commit | 170ba6f0675a21b2032900aa0d88727ce60c0b8d (patch) | |
tree | f0d636461c7d911b29c2d4295d3263772246d5b7 | |
parent | 7d5fb6ffc4aafc74566cdae575fae64adcad4075 (diff) |
add filters for internet category
-rwxr-xr-x | everything.py | 22 | ||||
-rwxr-xr-x | internet.py | 16 |
2 files changed, 26 insertions, 12 deletions
diff --git a/everything.py b/everything.py index f1d1f8e..797d579 100755 --- a/everything.py +++ b/everything.py @@ -38,17 +38,17 @@ class Everything(QtWidgets.QMainWindow): with sqlite3.connect('/var/lib/epkg/db/epkg.db') as db: cursor=db.cursor() cursor.execute(''' - SELECT - a.category AS cat, - a.name AS pn, - a.version AS av, - i.version AS iv, - a.description AS descr - FROM remote_packages AS a - LEFT JOIN local_packages AS i - ON a.category = i.category - AND a.name = i.name - AND a.slot = i.slot + SELECT + a.category AS cat, + a.name AS pn, + a.version AS av, + i.version AS iv, + a.description AS descr + FROM remote_packages AS a + LEFT JOIN local_packages AS i + ON a.category = i.category + AND a.name = i.name + AND a.slot = i.slot ''') rows = cursor.fetchall() diff --git a/internet.py b/internet.py index 9eeedeb..fcfc219 100755 --- a/internet.py +++ b/internet.py @@ -37,7 +37,21 @@ class Internet(QtWidgets.QMainWindow): def load_packages(self): with sqlite3.connect('/var/lib/epkg/db/epkg.db') as db: cursor=db.cursor() - cursor.execute('''SELECT * from remote_packages''') + cursor.execute(''' + SELECT + a.category AS cat, + a.name AS pn, + a.version AS av, + i.version AS iv, + a.description AS descr + FROM remote_packages AS a + LEFT JOIN local_packages AS i + ON a.category = i.category + AND a.name = i.name + AND a.slot = i.slot + WHERE a.name IN + ('firewalld', 'ufw', 'ufw-frontends', 'filezilla', 'franz', 'qtox', 'telegram', 'viber', 'konversation', 'quassel', 'dropbox', 'megasync', 'owncloud-client', 'teamviewer', 'tigervnc', 'youtube-dl', 'quiterss', 'qbittorrent', 'qbittorrent', 'transmission', 'firefox', 'google-chrome', 'opera', 'qupzilla', 'vivaldi', 'adobe-flash', 'chrome-binary-plugins', 'freshplayerplugin', 'google-talkplugin', 'wmail', 'trojita') + ''') rows = cursor.fetchall() for row in rows: |