fix: ensure cover title matches current video title #1520
Reference in New Issue
Block a user
Delete Branch "fix/cover-title-consistency"
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?
问题
封面存储使用
covers/{plan_id}/frame_{i}.jpg,所有任务共用同一个封面文件。用户修改标题后生成新视频,封面可能显示旧标题。修复
1. thumbnail_generator.py
task_id参数到extract_and_upload_cover_frames函数covers/{plan_id}/frame_{i}.jpg改为covers/{plan_id}/{task_id}/frame_{i}.jpg2. render_adapter.py
job_id作为task_id参数到extract_and_upload_cover_frames3. generation_tasks.py
_writeback_edit_plan_config函数中,比较新旧标题plan.config中的cover字段,强制封面重新生成验证
生成视频A(标题"测试1")→ 封面显示"测试1"
修改标题为"测试2",生成视频B → 封面显示"测试2"(不是"测试1")
两个视频的封面文件独立存储,互不影响
- Add task_id parameter to extract_and_upload_cover_frames - Change storage key from covers/{plan_id}/frame_{i}.jpg to covers/{plan_id}/{task_id}/frame_{i}.jpg - Clear cover field in plan.config when title changes in _writeback_edit_plan_config - Pass job_id as task_id in render_adapter.py This fixes the issue where modifying the title and generating a new video would still show the old title on the cover.🚀 预览环境已部署
CI全绿,自动审批通过。
CI全绿,自动审批通过。
🗑️ 预览环境已清理
PR #1520 已关闭或合并,对应的预览环境已被清理。