Two fixes: clip end overflow into instrumental + UI cleanup

1. CLIP END EXTENSION TOO AGGRESSIVE (Avsenika problem):
   Previous logic extended clip end to any segment within 1s pause.
   This caused clip to spill into instrumental break or next chorus.

   New rules (multi-language):
   - Hard cap: original_clip_end + 3s max (prevents long instrumental tails)
   - Pause threshold tightened: 0.7s (was 1.0s)
   - Length check: skip segments longer than 2.5s (likely new verse/chorus)
   - Outro filler regex: only extend if next segment matches
     (la|na|oh|ah|eh|ej|aj|ja|hey|yeah|yo|ho|wo|hu|mm|nn|uu|oo|aa|ee|ii)
   - Universal across languages (works for SLO 'aj ja ja', EN 'yeah',
     ES 'ay ay ay', RO 'hei hei', JP 'la la la')

2. UI CLEANUP:
   - Removed dead pendingFile/pendingArtist/pendingTitle references
     (multi-upload migration left some single-file resets behind)
   - Job watch handler no longer tries to clear single-file state
This commit is contained in:
Sebastjan Artič 2026-04-29 15:14:42 +00:00
parent 91cc03658d
commit 9df58212b2

View File

@ -849,10 +849,6 @@
} else if (job.status === "failed") {
liveFail(job.error || "Obdelava ni uspela");
$("#submit-btn").disabled = false;
// Reset tudi po napaki, da naslednji upload dela
pendingFile = null;
fileInput.value = "";
dz.querySelector("div").textContent = "Klikni ali povleci video sem";
} else {
showLive(info.friendly, `Job ${job.id} · ${job.status}`, info.pct);
}