forked from 77media/video-flow
兼容 detail 外面数据
This commit is contained in:
parent
3b437a4828
commit
8590196ff8
@ -363,6 +363,10 @@ export interface VideoFlowProjectResponse {
|
|||||||
last_message: string;
|
last_message: string;
|
||||||
/** 项目内容 */
|
/** 项目内容 */
|
||||||
data: ProjectContentData;
|
data: ProjectContentData;
|
||||||
|
/** 最终简单视频 */
|
||||||
|
final_simple_video: string;
|
||||||
|
/** 最终视频 */
|
||||||
|
final_video: string;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 新角色列表项接口
|
* 新角色列表项接口
|
||||||
|
|||||||
@ -252,7 +252,7 @@ export function useWorkflowData({ onEditPlanGenerated }: UseWorkflowDataProps =
|
|||||||
loadingText.current = LOADING_TEXT_MAP.postProduction('AI-powered video editing in progress…');
|
loadingText.current = LOADING_TEXT_MAP.postProduction('AI-powered video editing in progress…');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (taskObject.currentStage === 'final_video') {
|
if (taskObject.currentStage === 'final_video' && taskObject.status !== 'COMPLETED') {
|
||||||
loadingText.current = LOADING_TEXT_MAP.postProduction('generating fine-grained video clips...');
|
loadingText.current = LOADING_TEXT_MAP.postProduction('generating fine-grained video clips...');
|
||||||
}
|
}
|
||||||
if (taskObject.status === 'COMPLETED') {
|
if (taskObject.status === 'COMPLETED') {
|
||||||
@ -498,7 +498,7 @@ export function useWorkflowData({ onEditPlanGenerated }: UseWorkflowDataProps =
|
|||||||
throw new Error(response.message);
|
throw new Error(response.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
const { status, data, tags, mode, original_text, title, name } = response.data;
|
const { status, data, tags, mode, original_text, title, name, final_simple_video, final_video } = response.data;
|
||||||
|
|
||||||
const { current: taskCurrent } = tempTaskObject;
|
const { current: taskCurrent } = tempTaskObject;
|
||||||
|
|
||||||
@ -611,6 +611,21 @@ export function useWorkflowData({ onEditPlanGenerated }: UseWorkflowDataProps =
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 粗剪
|
||||||
|
if (final_simple_video) {
|
||||||
|
taskCurrent.currentStage = 'final_video';
|
||||||
|
taskCurrent.final.url = final_simple_video;
|
||||||
|
taskCurrent.final.note = 'simple';
|
||||||
|
taskCurrent.status = 'COMPLETED';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (final_video) {
|
||||||
|
taskCurrent.currentStage = 'final_video';
|
||||||
|
taskCurrent.final.url = final_video;
|
||||||
|
taskCurrent.final.note = 'final';
|
||||||
|
taskCurrent.status = 'COMPLETED';
|
||||||
|
}
|
||||||
|
|
||||||
console.log('---look-taskData', taskCurrent);
|
console.log('---look-taskData', taskCurrent);
|
||||||
|
|
||||||
if (taskCurrent.currentStage === 'script') {
|
if (taskCurrent.currentStage === 'script') {
|
||||||
@ -632,7 +647,7 @@ export function useWorkflowData({ onEditPlanGenerated }: UseWorkflowDataProps =
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 设置是否需要获取流式数据
|
// 设置是否需要获取流式数据
|
||||||
setNeedStreamData(status !== 'COMPLETED');
|
setNeedStreamData(taskCurrent.status !== 'COMPLETED');
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('初始化失败:', error);
|
console.error('初始化失败:', error);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user