This commit is contained in:
Arnaud_Cayrol 2025-04-12 22:17:46 +02:00
parent ee7f450a96
commit 57a6651394
2 changed files with 5 additions and 6 deletions

View file

@ -96,11 +96,11 @@ def background_process(
progress_callback=progress_callback, progress_callback=progress_callback,
cancel_flag=cancel_flag cancel_flag=cancel_flag
) )
if progress_callback:
progress_callback(1, 1)
if not do_not_compile_video and not cancel_flag(): if not do_not_compile_video and not cancel_flag():
if progress_callback:
progress_callback(0, 1) # Reset progress for video compilation
progress_info["status"] = "compiling_video" progress_info["status"] = "compiling_video"
video_output_path = os.path.join(config.output_folder, "timelapse.mp4") video_output_path = os.path.join(config.output_folder, "timelapse.mp4")
success = compile_timelapse( success = compile_timelapse(
@ -179,7 +179,6 @@ def index() -> str:
"total": 0, "total": 0,
"status": "idle" "status": "idle"
}) })
progress_info.pop("video_path", None)
# Start processing # Start processing
processing_thread = threading.Thread( processing_thread = threading.Thread(

View file

@ -223,7 +223,7 @@
<div class="form-group" id="framerateGroup" style="display:none;"> <div class="form-group" id="framerateGroup" style="display:none;">
<label> <label>
Frames per second: Frames per second:
<input type="number" name="framerate" value="24" min="1" max="60"> <input type="number" name="framerate" value="15" min="1">
</label> </label>
</div> </div>
@ -339,7 +339,7 @@
} }
// Poll every 1 second // Poll every 1 second
setInterval(fetchProgress, 1000); setInterval(fetchProgress, 200);
// Form submission // Form submission
document.getElementById('timelapseForm').addEventListener('submit', function() { document.getElementById('timelapseForm').addEventListener('submit', function() {