From 9df58212b2567655aea40a66ba2f31aa1f976826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastjan=20Arti=C4=8D?= Date: Wed, 29 Apr 2026 15:14:42 +0000 Subject: [PATCH] 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 --- templates/index.html | 4 ---- 1 file changed, 4 deletions(-) diff --git a/templates/index.html b/templates/index.html index 75ea7b8..3c026d3 100644 --- a/templates/index.html +++ b/templates/index.html @@ -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); }