fix: 首帧批量生成默认限定当前剧集

This commit is contained in:
GouJ
2026-09-01 15:34:50 +08:00
parent 0ec1eb1e16
commit b74eb9feed
+12 -2
View File
@@ -83,9 +83,14 @@ export function useProduction() {
const input = { concurrency: concurrency.value, force: force.value }
const target = getProductionSession(projectId)
target.receipt = null
const staleKeyframes = query.data.value?.keyframes.stalePrimaryKeyframe ?? 0
const labels: Record<ProductionCommand, string> = {
prompts: force.value ? '重生成项目视频提示词' : '补齐项目视频提示词',
keyframes: force.value ? '新增项目首帧候选' : '补齐或更新项目主首帧',
keyframes: force.value
? '新增项目首帧候选'
: staleKeyframes > 0
? `更新 ${staleKeyframes} 个过期主首帧`
: `补齐第 ${episodeNo.value} 集主首帧`,
videos: force.value ? '新增项目视频候选' : '提交就绪视频任务',
'retry-videos': '重试失败视频任务'
}
@@ -100,7 +105,12 @@ export function useProduction() {
target.receipt = {
kind: 'keyframes',
title: labels[command],
result: await productionApi.generateKeyframes(projectId, { provider: 'seedream', ...input })
result: await productionApi.generateKeyframes(projectId, {
provider: 'seedream',
...input,
// 有 stale 时由后端优先处理全部 stale;否则只补当前剧集,避免误跑整个项目。
...(force.value || staleKeyframes > 0 ? {} : { episodeNo: episodeNo.value })
})
}
} else if (command === 'videos') {
target.receipt = {