get_srt
This commit is contained in:
parent
5103e8f81b
commit
b4c4a2fabb
2 changed files with 12 additions and 6 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue