feat: estimate game duration from genres and tags
CI / test (push) Successful in 15s

This commit is contained in:
strsv committed 2026-11-06 17:21:21 +03:00
1 parent b65c8c39fe
commit b2ab347129
18 files changed
+166 -25

No files matched your search

+2
View File
@@ -153,6 +153,7 @@ def recommend(con, mood, allowed_statuses=None, unplayed_only=False,
rows = con.execute("""
SELECT g.appid, g.name, g.metacritic, g.review_pct, g.release_date,
g.estimated_hours,
COALESCE(p.minutes, 0) AS minutes, p.last_played,
COALESCE(i.installed, 0) AS installed,
COALESCE(pe.status, 'backlog') AS status, pe.rating, pe.favorite, pe.notes
@@ -274,6 +275,7 @@ def recommend(con, mood, allowed_statuses=None, unplayed_only=False,
"review": r["review_pct"],
"metacritic": r["metacritic"],
"hours": round(r["minutes"] / 60, 1),
"duration": r["estimated_hours"],
"installed": bool(r["installed"]),
"status": r["status"],
"rating": r["rating"],