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

+3 -1
View File
@@ -1505,7 +1505,9 @@ class Handler(BaseHTTPRequestHandler):
except (KeyError, ValueError):
self._error(400, "unknown mood")
return
allowed = {"backlog", "playing", "played"}
allowed = {"backlog", "playing"}
if body.get("include_played"):
allowed.add("played")
if body.get("include_tribute"):
allowed.add("tribute")
if body.get("include_nostalgia"):
+1
View File
@@ -1186,6 +1186,7 @@ async function runRecommend(scroll = true) {
preset: state.preset,
mood: state.preset ? null : text,
unplayed_only: $("#optUnplayed").checked,
include_played: $("#optPlayed").checked,
include_tribute: $("#optTribute").checked,
include_nostalgia: $("#optNostalgia").checked,
min_review: Number($("#optReview").value),
+1
View File
@@ -291,6 +291,7 @@ try {
<label class="check"><input type="checkbox" id="optUnplayed" checked> только неигранное</label>
<label class="check"><input type="checkbox" id="optTribute"> учитывать tribute</label>
<label class="check"><input type="checkbox" id="optNostalgia"> учитывать nostalgia</label>
<label class="check"><input type="checkbox" id="optPlayed"> учитывать пройденные</label>
<label class="range">мин. отзывы <input type="range" id="optReview" min="0" max="95" step="5" value="65"><b id="optReviewVal">65%</b></label>
<label class="range">время
<select id="optSession" aria-label="Доступное время">