map track language to track

This commit is contained in:
j 2014-07-20 11:20:43 +02:00
parent 2bd1c7d657
commit bc9c3c8944

View file

@ -215,10 +215,16 @@ def ffprobe(filename):
info['metadata'] = ffinfo['format'].get('tags', {})
for s in ffinfo['streams']:
tags = s.pop('tags', {})
language = None
for t in tags:
info['metadata'][t] = tags[t]
if t == 'language':
language = tags[t]
else:
info['metadata'][t] = tags[t]
if s.get('codec_type') in ('audio', 'video'):
stream = {}
if language and language != 'und':
stream['language'] = language
keys = [
'codec_name',
'width',