mirror of
https://github.com/MrSleeps/jellyfin-scene-search.git
synced 2026-11-18 07:51:27 +00:00
Allow caption jobs to pause between frames
This commit is contained in:
@@ -427,6 +427,7 @@ def _caption_queue(
|
||||
completed_offset: int = 0,
|
||||
total_frames: int | None = None,
|
||||
frame_source: FrameSource | None = None,
|
||||
before_frame: Callable[[], None] | None = None,
|
||||
) -> tuple[int, int]:
|
||||
if not routed_rows:
|
||||
return 0, 0
|
||||
@@ -446,6 +447,8 @@ def _caption_queue(
|
||||
failed = 0
|
||||
try:
|
||||
for row, route, score, reason in routed_rows:
|
||||
if before_frame is not None:
|
||||
before_frame()
|
||||
if progress is not None:
|
||||
progress(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user