ai-tube / src /app /server /actions /ai-tube-hf /deleteVideoRequest.ts
jbilcke-hf's picture
jbilcke-hf HF staff
hide some features for the beta + improve player
f27679f
raw
history blame
573 Bytes
import { VideoInfo } from "@/types"
import { deleteFileFromDataset } from "./deleteFileFromDataset"
import { formatPromptFileName } from "../utils/formatPromptFileName"
export async function deleteVideoRequest({
video,
apiKey,
neverThrow,
}: {
video: VideoInfo
apiKey: string
neverThrow?: boolean
}): Promise<boolean> {
const repo = `datasets/${video.channel.datasetUser}/${video.channel.datasetName}`
const { fileName } = formatPromptFileName(video.id)
return deleteFileFromDataset({
repo,
path: fileName,
apiKey,
neverThrow,
})
}