feat: exclude completed games from recommendations

Skip played and ignore statuses by default; add an include-played toggle to the API, CLI and UI for replay suggestions.
This commit is contained in:
strsv committed 2026-11-07 00:57:53 +03:00
1 parent 6a1b3aadfc
commit 2f5791d1a3
11 files changed
+40 -10

No files matched your search

+2 -2
View File
@@ -247,9 +247,9 @@ def load_mood(con, preset=None, text=None):
def recommend(con, mood, allowed_statuses=None, unplayed_only=False,
min_review=65, allow_unknown=False, limit=20, feedback_key=None,
session=None, time_of_day=None, taste_profile=None):
allowed = set(allowed_statuses or {"backlog", "playing", "played"})
allowed = set(allowed_statuses or {"backlog", "playing"})
if not allowed:
allowed = {"backlog", "playing", "played"}
allowed = {"backlog", "playing"}
if taste_profile and taste_profile not in TASTE_PROFILES:
raise ValueError(f"unknown taste profile: {taste_profile}")
context_appids = taste_profile_appids(con, taste_profile) if taste_profile else None
+5 -1
View File
@@ -33,6 +33,8 @@ def main():
help="skip games below this Steam review percentage (default 65)")
ap.add_argument("--db", default=db.DEFAULT_DB)
ap.add_argument("--unplayed-only", action="store_true", help="only games with 0 minutes")
ap.add_argument("--include-played", action="store_true",
help="include games marked as completed (status=played)")
ap.add_argument("--include-tribute", action="store_true",
help="include games you played outside Steam (status=tribute)")
ap.add_argument("--include-nostalgia", action="store_true",
@@ -63,7 +65,9 @@ def main():
if not mood["tags"] and not mood["genres"]:
raise SystemExit("Could not understand the mood; try different words")
allowed = {"backlog", "playing", "played"}
allowed = {"backlog", "playing"}
if args.include_played:
allowed.add("played")
if args.include_tribute:
allowed.add("tribute")
if args.include_nostalgia: