dont throw exception for invalid files
This commit is contained in:
parent
75e0ec06f9
commit
f02d42712d
1 changed files with 58 additions and 55 deletions
|
@ -219,6 +219,9 @@ def ffprobe(filename):
|
||||||
return value
|
return value
|
||||||
|
|
||||||
info = {}
|
info = {}
|
||||||
|
if not 'format' in ffinfo:
|
||||||
|
info['error'] = 'badfile'
|
||||||
|
else:
|
||||||
for key in ('duration', 'size', 'bit_rate'):
|
for key in ('duration', 'size', 'bit_rate'):
|
||||||
info[{
|
info[{
|
||||||
'bit_rate': 'bitrate'
|
'bit_rate': 'bitrate'
|
||||||
|
|
Loading…
Add table
Reference in a new issue