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,
cancel_flag=cancel_flag
)
if progress_callback:
progress_callback(1, 1)
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"
video_output_path = os.path.join(config.output_folder, "timelapse.mp4")
success = compile_timelapse(
@ -179,7 +179,6 @@ def index() -> str:
"total": 0,
"status": "idle"
})
progress_info.pop("video_path", None)
# Start processing
processing_thread = threading.Thread(

View file

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