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