Skip to content

Commit 28199c9

Browse files
committed
feat: return combined videos in /api/v1/tasks response
1 parent 87a837a commit 28199c9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/services/task.py

+3
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ def start(task_id, params: VideoParams):
127127
sm.update_task(task_id, state=const.TASK_STATE_PROCESSING, progress=50)
128128

129129
final_video_paths = []
130+
combined_video_paths = []
130131
video_concat_mode = params.video_concat_mode
131132
if params.video_count > 1:
132133
video_concat_mode = VideoConcatMode.random
@@ -162,11 +163,13 @@ def start(task_id, params: VideoParams):
162163
sm.update_task(task_id, progress=_progress)
163164

164165
final_video_paths.append(final_video_path)
166+
combined_video_paths.append(combined_video_path)
165167

166168
logger.success(f"task {task_id} finished, generated {len(final_video_paths)} videos.")
167169

168170
kwargs = {
169171
"videos": final_video_paths,
172+
"combined_videos": combined_video_paths
170173
}
171174
sm.update_task(task_id, state=const.TASK_STATE_COMPLETE, progress=100, **kwargs)
172175
return kwargs

0 commit comments

Comments
 (0)