diff --git a/components/pages/work-flow/use-workflow-data.tsx b/components/pages/work-flow/use-workflow-data.tsx index e662601..a1d5b1d 100644 --- a/components/pages/work-flow/use-workflow-data.tsx +++ b/components/pages/work-flow/use-workflow-data.tsx @@ -210,7 +210,7 @@ export function useWorkflowData() { // 收集所有需要更新的状态 let stateUpdates = JSON.stringify(taskCurrent); // 视频分析 - let analyze_video_completed_count = all_task_data.filter((item: any) => item.task_name === 'generate_analyze_video' && item.task_status !== 'INIT').length; + let analyze_video_completed_count = all_task_data.filter((item: any) => item.task_name === 'generate_analyze_video' && item.task_status !== 'INIT' && item.task_status !== 'RUNING').length; let analyze_video_total_count = all_task_data.filter((item: any) => item.task_name === 'generate_analyze_video').length; if (analyze_video_total_count && analyze_video_completed_count === analyze_video_total_count) { setCanGoToCut(true); @@ -392,16 +392,16 @@ export function useWorkflowData() { throw new Error(response.message); } - const { name, status, data, tags, mode, original_text } = response.data; + const { status, data, tags, mode, original_text, title } = response.data; const { current: taskCurrent } = tempTaskObject; - taskCurrent.title = name || 'generating...'; + taskCurrent.title = title || 'generating...'; taskCurrent.tags = tags || []; taskCurrent.status = status as Status; // 设置标题 - if (!name) { + if (!title) { // 如果没有标题,轮询获取 const titleResponse = await getScriptTitle({ project_id: episodeId }); console.log('titleResponse', titleResponse);