diff --git a/backend/queue.py b/backend/queue.py index fe60095..d0e6e38 100644 --- a/backend/queue.py +++ b/backend/queue.py @@ -39,11 +39,13 @@ async def _send_progress(task_id: str, progress: int, message: str, status: str, """Отправляет прогресс через callback.""" if _progress_callback: try: + task_info = tasks.get(task_id, {}) await _progress_callback({ "task_id": task_id, "progress": progress, "message": message, "status": status, + "file": task_info.get("file", ""), "result": result, "error": error, }) diff --git a/backend/static/app.js b/backend/static/app.js index 036c44b..d3b351f 100644 --- a/backend/static/app.js +++ b/backend/static/app.js @@ -147,7 +147,7 @@ class TranscriptionApp { // ===== Tasks / Progress ===== updateTasks(tasks) { tasks.forEach(task => { - this.tasks.set(task.file + '_' + task.started, task); + this.tasks.set(task.task_id, task); }); this.renderTasks(); }