include size for unknown formats

This commit is contained in:
j 2015-04-24 16:09:31 +02:00
parent 72f34f2a60
commit 47bdf3c897

View file

@ -230,9 +230,6 @@ def ffprobe(filename):
info[{
'bit_rate': 'bitrate'
}.get(key, key)] = fix_value(key, ffinfo['format'][key])
if not 'size' in info:
info['size'] = os.stat(filename).st_size
print('no size in info', filename, ffinfo)
info['audio'] = []
info['video'] = []
info['metadata'] = ffinfo['format'].get('tags', {})
@ -288,6 +285,8 @@ def ffprobe(filename):
v['pixel_aspect_ratio'] = '1:1'
info['oshash'] = oshash(filename)
info['path'] = filename
if not 'size' in info:
info['size'] = os.path.getsize(filename)
return info
def makedirs(path):