This commit is contained in:
j 2023-11-16 09:12:53 +01:00
commit b4c4a2fabb
2 changed files with 12 additions and 6 deletions

View file

@ -9,6 +9,8 @@ from django.conf import settings
import item.models
import itemlist.models
from ...render import get_srt
def resolve_roman(s):
extra = re.compile('^\d+(.*?)$').findall(s)
@ -101,8 +103,7 @@ class Command(BaseCommand):
os.symlink(src, target)
subs = []
for sub in vo.annotations.filter(layer="subtitles").exclude(value="").order_by("start"):
sdata = sub.json(keys=['in', 'out', 'value'])
sdata['value'] = sdata['value'].replace('<br/>', '<br>').replace('<br>\n', '\n').replace('<br>', '\n')
sdata = get_srt(sub)
subs.append(sdata)
voice_over[fragment_id][batch] = {
"src": target,