fix subtitle language
This commit is contained in:
parent
b49acd47dc
commit
23a641189c
1 changed files with 6 additions and 2 deletions
|
@ -296,13 +296,17 @@ def ffprobe(filename):
|
||||||
elif s.get('codec_type') == 'subtitle':
|
elif s.get('codec_type') == 'subtitle':
|
||||||
info['subtitles'] = info.get('subtitles', [])
|
info['subtitles'] = info.get('subtitles', [])
|
||||||
stream = {}
|
stream = {}
|
||||||
|
if language and language != 'und':
|
||||||
|
stream['language'] = language
|
||||||
for key in (
|
for key in (
|
||||||
'codec_name', 'language'
|
'codec_name',
|
||||||
|
'language',
|
||||||
|
'width',
|
||||||
|
'height',
|
||||||
):
|
):
|
||||||
if key in s:
|
if key in s:
|
||||||
stream[{
|
stream[{
|
||||||
'codec_name': 'codec',
|
'codec_name': 'codec',
|
||||||
|
|
||||||
}.get(key, key)] = s[key]
|
}.get(key, key)] = s[key]
|
||||||
info['subtitles'].append(stream)
|
info['subtitles'].append(stream)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue