1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 09:49:20 +02:00

Metadata to know if the caption is auto generated

This commit is contained in:
Chocobozzz 2024-06-27 15:29:26 +02:00
parent 1bfb791e05
commit fd4831e502
No known key found for this signature in database
GPG key ID: 583A612D890159BE
22 changed files with 101 additions and 29 deletions

View file

@ -25,13 +25,15 @@ export async function createLocalCaption (options: {
video: MVideo
path: string
language: string
automaticallyGenerated: boolean
}) {
const { language, path, video } = options
const { language, path, video, automaticallyGenerated } = options
const videoCaption = new VideoCaptionModel({
videoId: video.id,
filename: VideoCaptionModel.generateCaptionName(language),
language
language,
automaticallyGenerated
}) as MVideoCaption
await moveAndProcessCaptionFile({ path }, videoCaption)
@ -148,7 +150,8 @@ export async function onTranscriptionEnded (options: {
const caption = await createLocalCaption({
video,
language,
path: vttPath
path: vttPath,
automaticallyGenerated: true
})
await sequelizeTypescript.transaction(async t => {