diff --git a/ox/file.py b/ox/file.py index 775c13b..9791f81 100644 --- a/ox/file.py +++ b/ox/file.py @@ -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):