Movie Editor: clear scene rating when a scene is regenerated

Reset rating to empty after a successful generate so the timeline shows
"— rate —" and Studio receives "-Just forget it-" until the user rates again.
This commit is contained in:
digital-garbage
2026-06-10 14:05:50 +03:00
parent 82bb1511d5
commit 3a7b89ba2b
+5
View File
@@ -436,11 +436,16 @@
if (!mediaList || !mediaList.length || !targetSceneIds || !targetSceneIds.length) return;
const primary = mediaList.find((m) => m.kind === "videos" || m.kind === "gifs") || mediaList[0];
let inAcc = 0;
let clearedRating = false;
for (const id of targetSceneIds) {
const sc = scene(id); if (!sc) continue;
state.sceneRenders[id] = { media: primary, inSec: inAcc };
// New render invalidates the prior RLHF rating — UI shows "— rate —"; server
// treats empty as "-Just forget it-" on the next Studio run.
if (sc.rating) { sc.rating = ""; clearedRating = true; }
inAcc += sceneDurationSec(sc);
}
if (clearedRating) scheduleSaveSilent();
}
// Poll a single queued prompt to completion. Resolves true on success, false on error.