Queue durable Studio 2 jobs with sticky identity and saved metadata
This commit is contained in:
@@ -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 })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user