mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-14 07:12:41 +00:00
[postprocessor] Fix _restrict_to
when a codec is not set
This commit is contained in:
parent
d0fb4bd16f
commit
7e87e27c52
1 changed files with 2 additions and 2 deletions
|
@ -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…
Reference in a new issue