fix(api): create_plan接口增加asset_ids参数,修复一键生成片段无素材问题 #477
Reference in New Issue
Block a user
Delete Branch "fix/create-plan-asset-ids"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题
一键生成剪辑计划时,生成的 clips.asset_id 全为空,导致渲染时报"没有可渲染的就绪片段"。
根因
create_plan接口调用PlanGeneratorService.generate_from_template()时,asset_ids硬编码为[],用户传入的素材ID没有传递进去。PlanGeneratorService 本身有完整的按 editing_mode 分配素材的逻辑(ONE_TAKE/PIP/VOICE_OVER/VOICE_PIP),但传空数组就全跳过了。
修复
EditPlanCreateRequest增加asset_ids字段create_plan调用生成器时传递body.asset_idsasset_ids写入plan.config,供生成时兜底分配使用test_create_with_asset_ids测试验证参数传递影响范围
CI全绿,自动审批通过。
CI全绿,自动审批通过。