diff options
Diffstat (limited to 'main.py')
-rwxr-xr-x | main.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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()) |