import/export subtitles
This commit is contained in:
parent
01f669b61d
commit
80db2f0255
5 changed files with 116 additions and 5 deletions
|
|
@ -28,6 +28,7 @@ class Command(BaseCommand):
|
|||
help = 'generate symlinks to clips and clips.json'
|
||||
|
||||
def add_arguments(self, parser):
|
||||
parser.add_argument('--lang', action='store', dest='lang', default=None, help='subtitle language')
|
||||
parser.add_argument('--prefix', action='store', dest='prefix', default="/srv/t_for_time", help='prefix to build clips in')
|
||||
|
||||
def handle(self, **options):
|
||||
|
|
@ -102,7 +103,7 @@ class Command(BaseCommand):
|
|||
os.unlink(target)
|
||||
os.symlink(src, target)
|
||||
subs = []
|
||||
for sub in vo.annotations.filter(layer="subtitles").exclude(value="").order_by("start"):
|
||||
for sub in vo.annotations.filter(layer="subtitles", languages=options["lang"]).exclude(value="").order_by("start"):
|
||||
sdata = get_srt(sub)
|
||||
subs.append(sdata)
|
||||
voice_over[fragment_id][batch] = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue