diff --git a/site/app.py b/site/app.py index d7034d2..b94c351 100644 --- a/site/app.py +++ b/site/app.py @@ -20,7 +20,7 @@ if _sys_path_root not in sys.path: sys.path.insert(0, _sys_path_root) # Версия приложения (меняется при изменениях) -VERSION = "0.0.41" +VERSION = "0.0.42" def create_app(): diff --git a/site/templates/index.html b/site/templates/index.html index 671e2f1..ac12186 100644 --- a/site/templates/index.html +++ b/site/templates/index.html @@ -462,6 +462,11 @@ async function uploadFiles() { activeES = new EventSource('/api/process_stream/' + currentSid); activeES.addEventListener('start', function(e) { const d = JSON.parse(e.data); + // Таймер тикает ТОЛЬКО у текущего файла; таймеры остальных останавливаем + for (const k in fileIntervals) { + clearInterval(fileIntervals[k]); + delete fileIntervals[k]; + } fileTimers[d.idx] = performance.now(); fileIntervals[d.idx] = setInterval(function() { const elapsed = ((performance.now() - fileTimers[d.idx]) / 1000).toFixed(1);