subtitle tweaks

This commit is contained in:
j 2023-11-14 19:52:12 +01:00
commit 4de39b926a
2 changed files with 9 additions and 5 deletions

View file

@ -101,7 +101,9 @@ class Command(BaseCommand):
os.symlink(src, target)
subs = []
for sub in vo.annotations.filter(layer="subtitles").exclude(value="").order_by("start"):
subs.append(sub.json(keys=['in', 'out', 'value']))
sdata = sub.json(keys=['in', 'out', 'value'])
sdata['value'] = sdata['value'].replace('<br/>', '<br>').replace('<br>\n', '\n').replace('<br>', '\n')
subs.append(sdata)
voice_over[fragment_id][batch] = {
"src": target,
"duration": source.duration,