Persist queued jobs to disk, import leftover MP4s from Comfy history, and do not mark a run complete until the saved video exists. Co-authored-by: Cursor <cursoragent@cursor.com>
12 lines
355 B
TypeScript
12 lines
355 B
TypeScript
export default defineEventHandler(async (event) => {
|
|
const library = publicLibrary(event)
|
|
try {
|
|
const { owner } = assertLibraryOwner(event)
|
|
const folderId = library.folders.find(folder => folder.unlocked)?.id
|
|
if (folderId) await importMissingComfyVideos(owner, folderId)
|
|
} catch {
|
|
return library
|
|
}
|
|
return publicLibrary(event)
|
|
})
|