fix: 首帧批量生成默认限定当前剧集
This commit is contained in:
@@ -83,9 +83,14 @@ export function useProduction() {
|
|||||||
const input = { concurrency: concurrency.value, force: force.value }
|
const input = { concurrency: concurrency.value, force: force.value }
|
||||||
const target = getProductionSession(projectId)
|
const target = getProductionSession(projectId)
|
||||||
target.receipt = null
|
target.receipt = null
|
||||||
|
const staleKeyframes = query.data.value?.keyframes.stalePrimaryKeyframe ?? 0
|
||||||
const labels: Record<ProductionCommand, string> = {
|
const labels: Record<ProductionCommand, string> = {
|
||||||
prompts: force.value ? '重生成项目视频提示词' : '补齐项目视频提示词',
|
prompts: force.value ? '重生成项目视频提示词' : '补齐项目视频提示词',
|
||||||
keyframes: force.value ? '新增项目首帧候选' : '补齐或更新项目主首帧',
|
keyframes: force.value
|
||||||
|
? '新增项目首帧候选'
|
||||||
|
: staleKeyframes > 0
|
||||||
|
? `更新 ${staleKeyframes} 个过期主首帧`
|
||||||
|
: `补齐第 ${episodeNo.value} 集主首帧`,
|
||||||
videos: force.value ? '新增项目视频候选' : '提交就绪视频任务',
|
videos: force.value ? '新增项目视频候选' : '提交就绪视频任务',
|
||||||
'retry-videos': '重试失败视频任务'
|
'retry-videos': '重试失败视频任务'
|
||||||
}
|
}
|
||||||
@@ -100,7 +105,12 @@ export function useProduction() {
|
|||||||
target.receipt = {
|
target.receipt = {
|
||||||
kind: 'keyframes',
|
kind: 'keyframes',
|
||||||
title: labels[command],
|
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') {
|
} else if (command === 'videos') {
|
||||||
target.receipt = {
|
target.receipt = {
|
||||||
|
|||||||
Reference in New Issue
Block a user