summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorAndré Glüpker <git@wgmd.de>2018-01-06 21:18:09 +0100
committerAndré Glüpker <git@wgmd.de>2018-01-06 21:18:09 +0100
commitfd3e38f818d1cf29fb71820afa0a65e61a875a20 (patch)
treec62afebf8f39d9dbfa4287e3f16f5f1a483cbf04 /main.py
parentc9bad924c7c3bc91cdf220fbc1507d1812d504f3 (diff)
downloadsteam-fd3e38f818d1cf29fb71820afa0a65e61a875a20.tar.gz
steam-fd3e38f818d1cf29fb71820afa0a65e61a875a20.tar.bz2
steam-fd3e38f818d1cf29fb71820afa0a65e61a875a20.zip
Remove gameextrainfo
Steam API does not provide this anymore. We now fetch the gamelist ourself and use gameid.
Diffstat (limited to 'main.py')
-rwxr-xr-xmain.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.py b/main.py
index ca1282e..4071be0 100755
--- a/main.py
+++ b/main.py
@@ -90,6 +90,7 @@ def lobby():
with open(os.path.join(CONFIG, 'lobby.json'), 'rt') as config:
steamids = json.load(config)
+ gamelist = steam.getGames()
profiledata = steam.getProfiles(steamids.keys())
# Merge new data in loaded config
@@ -121,11 +122,12 @@ def lobby():
steamids = OrderedDict(sorted(steamids.items(), key = lambda player: player[1]['personaname'].lower()))
steamids = OrderedDict(sorted(steamids.items(), reverse=True, key = lambda player: int(player[1]['lastlogoff'])))
steamids = OrderedDict(sorted(steamids.items(), key = lambda player: (player[1]['personastate'] > 0) and player[1]['personastate'] or 10))
- steamids = OrderedDict(sorted(steamids.items(), key = lambda player: ('gameextrainfo' in player[1] and player[1]['gameextrainfo'].lower() or "zzz")))
+ steamids = OrderedDict(sorted(steamids.items(), key = lambda player: ('gameid' in player[1] and player[1]['gameid'] or "zzz")))
return render_template('lobby_html.jinja',
steamids = steamids,
serverinfo = serverinfo,
+ gamelist = gamelist,
states = ['Offline', 'Online', 'Busy', 'Away', 'Snooze', 'Looking to trade', 'Looking to play'],
display_time = display_time,
current_time = time.time())