[postprocessor] Fix `_restrict_to` when a codec is not set

pull/443/head
pukkandan 3 years ago
parent d0fb4bd16f
commit 7e87e27c52
No known key found for this signature in database
GPG Key ID: 0F00D95A001F4698

@ -76,8 +76,8 @@ class PostProcessor(object):
@functools.wraps(func)
def wrapper(self, info):
format_type = (
'video' if info['vcodec'] != 'none'
else 'audio' if info['acodec'] != 'none'
'video' if info.get('vcodec') != 'none'
else 'audio' if info.get('acodec') != 'none'
else 'images')
if allowed[format_type]:
return func(self, info)

Loading…
Cancel
Save