Add friend search and online/offline filter, sort online friends first, move the comparison panel above the list, cache comparisons in the browser, add game search and show local/friend hours with installed badges.
This commit is contained in:
1 parent
71ca94d5e3
commit
80aae1a1df
7 files changed
+313
-63
No files matched your search
+10
-2
@@ -1436,8 +1436,13 @@ class Handler(BaseHTTPRequestHandler):
|
||||
return
|
||||
local = {
|
||||
row["appid"]: row for row in con.execute(
|
||||
"""SELECT g.appid, g.name, COALESCE(pe.status, 'backlog') AS status
|
||||
FROM games g LEFT JOIN personal pe ON pe.appid = g.appid
|
||||
"""SELECT g.appid, g.name, COALESCE(pe.status, 'backlog') AS status,
|
||||
COALESCE(p.minutes, 0) AS minutes,
|
||||
COALESCE(i.installed, 0) AS installed
|
||||
FROM games g
|
||||
LEFT JOIN personal pe ON pe.appid = g.appid
|
||||
LEFT JOIN game_playtime p ON p.appid = g.appid
|
||||
LEFT JOIN game_install i ON i.appid = g.appid
|
||||
WHERE LOWER(g.type) = 'game'""")
|
||||
}
|
||||
common, friend_only = [], []
|
||||
@@ -1450,6 +1455,8 @@ class Handler(BaseHTTPRequestHandler):
|
||||
common.append({
|
||||
"appid": appid, "name": local[appid]["name"],
|
||||
"status": local[appid]["status"], "friend_hours": hours,
|
||||
"local_hours": round((local[appid]["minutes"] or 0) / 60, 1),
|
||||
"installed": bool(local[appid]["installed"]),
|
||||
})
|
||||
else:
|
||||
friend_only.append({
|
||||
@@ -1465,6 +1472,7 @@ class Handler(BaseHTTPRequestHandler):
|
||||
"avatar": player.get("avatarmedium") or player.get("avatar") or "",
|
||||
"profile_url": player.get("profileurl")
|
||||
or f"https://steamcommunity.com/profiles/{friend_id}",
|
||||
"state": player.get("personastate"),
|
||||
"total_games": len(games),
|
||||
"common_count": len(common),
|
||||
"friend_only_count": len(friend_only),
|
||||
|
||||
Reference in new issue
Block a user