feat: 按质量结果管理主首帧候选
This commit is contained in:
1 parent
a72d96506a
commit
4298438219
6 files changed
+243
-88
No files matched your search
@@ -89,3 +89,15 @@ export function isVisualValidation(value: unknown): value is VisualValidation {
|
||||
export function sessionVideoValidation(projectId: string, shotId: string, assetId: string): VideoValidation | null {
|
||||
return qualitySession(qualityKey(projectId, { kind: 'video', shotId, assetId, title: '' })).videoValidation ?? null
|
||||
}
|
||||
|
||||
/** 首帧暂无质量历史 GET,只用本会话后端真实回执决定是否允许人工晋升。 */
|
||||
export function sessionKeyframePassed(projectId: string, shotId: string, assetId: string): boolean | null {
|
||||
const receipt = qualitySession(
|
||||
qualityKey(projectId, { kind: 'keyframe', shotId, assetId, title: '' })
|
||||
).receipt
|
||||
if (receipt?.kind === 'keyframe' && receipt.result.keyframeId === assetId) return receipt.result.passed
|
||||
if (receipt?.kind !== 'repair') return null
|
||||
if (receipt.result.finalKeyframeId === assetId) return receipt.result.passed
|
||||
if (!receipt.result.repaired && receipt.result.initialKeyframeId === assetId) return receipt.result.passed
|
||||
return null
|
||||
}
|
||||
Reference in new issue
Block a user