diff options
author | André Glüpker <git@wgmd.de> | 2017-10-02 17:35:33 +0200 |
---|---|---|
committer | André Glüpker <git@wgmd.de> | 2017-10-02 17:35:33 +0200 |
commit | 6dca917130c4b331f52f431b3033b63a0744b50a (patch) | |
tree | a4c769540186559b99adea2329534d8ef9287ea4 | |
parent | be2637000ad11c902b4f2e8020df2d2fecfc6e67 (diff) | |
download | steam-6dca917130c4b331f52f431b3033b63a0744b50a.tar.gz steam-6dca917130c4b331f52f431b3033b63a0744b50a.tar.bz2 steam-6dca917130c4b331f52f431b3033b63a0744b50a.zip |
Fetch given friendlists in parallel
-rwxr-xr-x | main.py | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -77,10 +77,11 @@ def lobby(): friends = request.args.get('friends') if friends: - for steamid in friends.split(','): - for friend in steam.getFriends(steamid): - if friend not in steamids: - steamids[friend] = {} + friendList = friends.split(',') + profiles = steam.getMultipleFriends(friendList) + for steamid, profile in profiles.items(): + for friendid in profile['friends']: + steamids[friendid] = {} else: # Load config (steamids, names) with open(os.path.join(CONFIG, 'lobby.json'), 'rt') as config: |