summaryrefslogtreecommitdiff
path: root/games.py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-04-17 00:08:20 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-04-17 00:08:20 +0100
commit49f9d629f3e8cadeb654d2da971e0cb97c4d092b (patch)
treeb2f2c6520316266250418380083ea003d8ef8279 /games.py
parentab99274cdee23b1a29b3e5715c824fbcc457b5f5 (diff)
rearrange the code a bit...it will be more easy to populate the tables
Diffstat (limited to 'games.py')
-rwxr-xr-xgames.py42
1 files changed, 27 insertions, 15 deletions
diff --git a/games.py b/games.py
index 9b24c3e..05e02b0 100755
--- a/games.py
+++ b/games.py
@@ -37,21 +37,33 @@ class Games(QtWidgets.QMainWindow):
def load_packages(self):
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
- WHERE a.name IN
- ('steam', 'playonlinux', 'armagetronad', 'chromium-bsu', 'supertuxkart', 'teeworlds', 'dosbox', 'snes9x', 'zsnes', 'urbanterror', 'openttd', '0ad', 'warzone2100', 'wesnoth')
- ''')
+ 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
+ ('steam',
+ 'playonlinux',
+ 'armagetronad',
+ 'chromium-bsu',
+ 'supertuxkart',
+ 'teeworlds',
+ 'dosbox',
+ 'snes9x',
+ 'zsnes',
+ 'urbanterror',
+ 'openttd',
+ '0ad',
+ 'warzone2100',
+ 'wesnoth')
+ ''')
rows = cursor.fetchall()
for row in rows: