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:
parent
1bfb791e05
commit
fd4831e502
22 changed files with 101 additions and 29 deletions
|
@ -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 => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue