summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Glüpker <git@wgmd.de>2017-10-02 17:35:33 +0200
committerAndré Glüpker <git@wgmd.de>2017-10-02 17:35:33 +0200
commit6dca917130c4b331f52f431b3033b63a0744b50a (patch)
treea4c769540186559b99adea2329534d8ef9287ea4
parentbe2637000ad11c902b4f2e8020df2d2fecfc6e67 (diff)
downloadsteam-6dca917130c4b331f52f431b3033b63a0744b50a.tar.gz
steam-6dca917130c4b331f52f431b3033b63a0744b50a.tar.bz2
steam-6dca917130c4b331f52f431b3033b63a0744b50a.zip
Fetch given friendlists in parallel
-rwxr-xr-xmain.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/main.py b/main.py
index d6c655a..fa0b728 100755
--- a/main.py
+++ b/main.py
@@ -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: