From a93ca1ec95b0b37a837091411e28321bb7fdb400 Mon Sep 17 00:00:00 2001 From: teahubxyz Date: Tue, 20 Oct 2026 20:05:36 +0000 Subject: [PATCH] gandora: stepping back through the session doesn't re-enter history or count as a new play Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01K6897PWcUEwHiqZMcVnNF6 --- ventures/gandora/index.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ventures/gandora/index.html b/ventures/gandora/index.html index 2453eb2..2007874 100644 --- a/ventures/gandora/index.html +++ b/ventures/gandora/index.html @@ -458,7 +458,7 @@ async function listStations() { } } function openStation(seed, { id, name = "", taste, history, played } = {}) { - if (state.stationId !== id) { state.audio.pause(); state.playing = false; setPlayIcon(); state.current = null; state.nextJob = null; } + if (state.stationId !== id) { state.audio.pause(); state.playing = false; setPlayIcon(); state.current = null; state.nextJob = null; state.recent = []; state.pos = -1; } state.seed = seed; state.station = name; state.stationId = id || `s-${Date.now()}-${hash32(seed)}`; state.taste = taste || { like: [], avoid: [], notes: [] }; state.history = history || []; state.played = played || 0; $("#stationName").textContent = name || seed; @@ -509,7 +509,8 @@ function cookNext() { } async function playJob(job) { const spec = job.spec; - state.current = job; state.history.push(spec); state.played = (state.played || 0) + 1; spec.stationId = state.stationId; + state.current = job; + if (!job.stepping) { state.history.push(spec); state.played = (state.played || 0) + 1; spec.stationId ||= state.stationId; } keepLabel(); $("#title").textContent = spec.title; $("#tags").textContent = `${spec.tags.split(",").slice(0, 5).join(",")} · ${spec.bpm} bpm · ${spec.key}`; $("#lyric").textContent = spec.line || "";