info might not have path
This commit is contained in:
parent
80ec29ecf1
commit
ce6a6ddb46
1 changed files with 2 additions and 1 deletions
|
@ -46,7 +46,8 @@ def avinfo(filename):
|
||||||
if not 'display_aspect_ratio' in info['video'][0]:
|
if not 'display_aspect_ratio' in info['video'][0]:
|
||||||
dar = AspectRatio(info['video'][0]['width'], info['video'][0]['height'])
|
dar = AspectRatio(info['video'][0]['width'], info['video'][0]['height'])
|
||||||
info['video'][0]['display_aspect_ratio'] = dar.ratio
|
info['video'][0]['display_aspect_ratio'] = dar.ratio
|
||||||
del info['path']
|
if 'path' in info:
|
||||||
|
del info['path']
|
||||||
if os.path.splitext(filename)[-1] in ('.srt', '.sub', '.idx', '.rar') and 'error' in info:
|
if os.path.splitext(filename)[-1] in ('.srt', '.sub', '.idx', '.rar') and 'error' in info:
|
||||||
del info['error']
|
del info['error']
|
||||||
if 'code' in info and info['code'] == 'badfile':
|
if 'code' in info and info['code'] == 'badfile':
|
||||||
|
|
Loading…
Reference in a new issue