Cleanup
This commit is contained in:
parent
ee7f450a96
commit
57a6651394
2 changed files with 5 additions and 6 deletions
7
main.py
7
main.py
|
|
@ -97,10 +97,10 @@ def background_process(
|
||||||
cancel_flag=cancel_flag
|
cancel_flag=cancel_flag
|
||||||
)
|
)
|
||||||
|
|
||||||
if not do_not_compile_video and not cancel_flag():
|
if progress_callback:
|
||||||
if progress_callback:
|
progress_callback(1, 1)
|
||||||
progress_callback(0, 1) # Reset progress for video compilation
|
|
||||||
|
|
||||||
|
if not do_not_compile_video and not cancel_flag():
|
||||||
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(
|
||||||
|
|
|
||||||
|
|
@ -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() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue