mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-18 21:22:28 +03:00
fix(video): include audioTranscript and focus window in the result cache key
This commit is contained in:
@@ -18,6 +18,9 @@ export interface BridgeCacheKeyOptions {
|
||||
maxVideos?: number;
|
||||
contactSheet?: boolean;
|
||||
transcript?: string;
|
||||
audioTranscript?: string;
|
||||
focusStartSeconds?: number | null;
|
||||
focusEndSeconds?: number | null;
|
||||
version?: string;
|
||||
}
|
||||
|
||||
@@ -42,6 +45,9 @@ export function bridgeCacheKey(
|
||||
maxVideos: options.maxVideos,
|
||||
contactSheet: options.contactSheet,
|
||||
transcript: options.transcript,
|
||||
audioTranscript: options.audioTranscript,
|
||||
focusStartSeconds: options.focusStartSeconds,
|
||||
focusEndSeconds: options.focusEndSeconds,
|
||||
version: options.version,
|
||||
};
|
||||
return createHash("sha256").update(JSON.stringify(payload)).digest("hex");
|
||||
|
||||
@@ -212,6 +212,7 @@ export class VideoBridgeGuardrail extends BaseGuardrail {
|
||||
focusEndSeconds: part.focusWindow?.endSeconds ?? null,
|
||||
focusStartSeconds: part.focusWindow?.startSeconds ?? null,
|
||||
transcript: safeTranscriptFingerprint(part.transcript),
|
||||
audioTranscript: safeTranscriptFingerprint(part.audioTranscript),
|
||||
contactSheet: part.contactSheet ?? false,
|
||||
version: VIDEO_BRIDGE_RESULT_CACHE_VERSION,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user