fix subtitle language

This commit is contained in:
j 2019-08-01 20:54:04 +02:00
parent b49acd47dc
commit 23a641189c

View file

@ -296,13 +296,17 @@ def ffprobe(filename):
elif s.get('codec_type') == 'subtitle':
info['subtitles'] = info.get('subtitles', [])
stream = {}
if language and language != 'und':
stream['language'] = language
for key in (
'codec_name', 'language'
'codec_name',
'language',
'width',
'height',
):
if key in s:
stream[{
'codec_name': 'codec',
}.get(key, key)] = s[key]
info['subtitles'].append(stream)
else: