Queue durable Studio 2 jobs with sticky identity and saved metadata

This commit is contained in:
Towsty
2026-09-10 20:56:37 -05:00
parent bd82f5bd5f
commit 70b6b70fcd
12 changed files with 374 additions and 10 deletions
+7
View File
@@ -35,6 +35,7 @@ export interface LibraryFolder {
}
export interface LibraryClip {
studio2?: Record<string, any>
id: string
folderId: string
name: string
@@ -95,6 +96,7 @@ export interface LibraryTrack {
export type StillRole = 'input' | 'output'
export interface LibraryStill {
studio2?: Record<string, any>
id: string
folderId: string
filename: string
@@ -270,6 +272,7 @@ function normalizeStill(still: LibraryStill): LibraryStill {
manualGroupIndex: still.manualGroupIndex,
parentStillId: still.parentStillId,
chainIndex: still.chainIndex,
studio2: still.studio2,
settings: normalizeStillSettings(still.settings)
}
}
@@ -2211,3 +2214,7 @@ export function groupLibraryStills(owner: string, ids: string[], ungroup = false
}
export function findUpscaledClip(owner: string, jobId: string) { return readCatalog(owner).clips.find(clip => clip.upscaleJobId === jobId) }
export async function attachStudio2Metadata(owner: string, id: string, metadata: Record<string, any>) {
await mutate(owner, catalog => { const item = catalog.clips.find(c => c.id === id) || catalog.stills.find(c => c.id === id); if (!item) throw new Error("Saved Studio 2 asset missing"); item.studio2 = metadata })
}