VideoChain-API / src /scheduler /savePendingVideo.mts
jbilcke-hf's picture
jbilcke-hf HF staff
add "movie director assistant" LLM step
e4e0e54
raw
history blame
415 Bytes
import { promises as fs } from "node:fs"
import path from "path"
import { Video } from "../types.mts"
import { pendingMetadataDirFilePath } from "../config.mts"
export const savePendingVideo = async (video: Video) => {
const fileName = `${video.ownerId}_${video.id}.json`
const filePath = path.join(pendingMetadataDirFilePath, fileName)
await fs.writeFile(filePath, JSON.stringify(video, null, 2), "utf8")
}