mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 19:42:24 +02:00
Don't replace caption on transcription
This commit is contained in:
parent
60a424059d
commit
300676f62b
2 changed files with 26 additions and 0 deletions
|
@ -154,6 +154,16 @@ export async function onTranscriptionEnded (options: {
|
|||
await video.save()
|
||||
}
|
||||
|
||||
const existing = await VideoCaptionModel.loadByVideoIdAndLanguage(video.id, language)
|
||||
if (existing && !existing.automaticallyGenerated) {
|
||||
logger.info(
|
||||
// eslint-disable-next-line max-len
|
||||
`Do not replace existing caption for video ${video.uuid} after transcription (subtitle may have been added while during the transcription process)`,
|
||||
lTags(video.uuid)
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
const caption = await createLocalCaption({
|
||||
video,
|
||||
language,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue