include size for unknown formats
This commit is contained in:
parent
72f34f2a60
commit
47bdf3c897
1 changed files with 2 additions and 3 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue