1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Integrate transcription in PeerTube

This commit is contained in:
Chocobozzz 2024-06-13 09:23:12 +02:00
parent ef14cf4a5c
commit 1bfb791e05
No known key found for this signature in database
GPG key ID: 583A612D890159BE
172 changed files with 2674 additions and 945 deletions

View file

@ -107,6 +107,8 @@ export class LocalVideoCreator {
this.channel = options.channel
this.videoAttributeResultHook = options.videoAttributeResultHook
this.lTags = options.lTags
}
async create () {
@ -201,8 +203,11 @@ export class LocalVideoCreator {
if (this.videoFile) {
transaction.afterCommit(() => {
addVideoJobsAfterCreation({ video: this.video, videoFile: this.videoFile })
.catch(err => logger.error('Cannot build new video jobs of %s.', this.video.uuid, { err, ...this.lTags(this.video.uuid) }))
addVideoJobsAfterCreation({
video: this.video,
videoFile: this.videoFile,
generateTranscription: this.videoAttributes.generateTranscription ?? true
}).catch(err => logger.error('Cannot build new video jobs of %s.', this.video.uuid, { err, ...this.lTags(this.video.uuid) }))
})
} else {
await federateVideoIfNeeded(this.video, true, transaction)