mirror of
https://github.com/yt-dlp/yt-dlp
synced 2024-11-30 21:29:36 +01:00
[postprocessor] Fix _restrict_to
when a codec is not set
This commit is contained in:
parent
d0fb4bd16f
commit
7e87e27c52
@ -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 New Issue
Block a user