0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-25 02:45:12 +00:00

Fix bug in storyboards

Caused by 9359f3d4f0
This commit is contained in:
pukkandan 2021-10-11 17:25:37 +05:30
parent 9dda99f2fc
commit a903d8285c
No known key found for this signature in database
GPG key ID: 0F00D95A001F4698

View file

@ -3072,6 +3072,7 @@ def record_download_archive(self, info_dict):
@staticmethod
def format_resolution(format, default='unknown'):
is_images = format.get('vcodec') == 'none' and format.get('acodec') == 'none'
if format.get('vcodec') == 'none' and format.get('acodec') != 'none':
return 'audio only'
if format.get('resolution') is not None:
@ -3082,11 +3083,11 @@ def format_resolution(format, default='unknown'):
res = '%sp' % format['height']
elif format.get('width'):
res = '%dx?' % format['width']
elif is_images:
return 'images'
else:
res = default
if format.get('vcodec') == 'none' and format.get('acodec') == 'none':
res += ' (images)'
return res
return default
return f'{res} images' if is_images else res
def _format_note(self, fdict):
res = ''