mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-23 17:02:30 +00:00
parent
9dda99f2fc
commit
a903d8285c
@ -3072,6 +3072,7 @@ def record_download_archive(self, info_dict):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def format_resolution(format, default='unknown'):
|
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':
|
if format.get('vcodec') == 'none' and format.get('acodec') != 'none':
|
||||||
return 'audio only'
|
return 'audio only'
|
||||||
if format.get('resolution') is not None:
|
if format.get('resolution') is not None:
|
||||||
@ -3082,11 +3083,11 @@ def format_resolution(format, default='unknown'):
|
|||||||
res = '%sp' % format['height']
|
res = '%sp' % format['height']
|
||||||
elif format.get('width'):
|
elif format.get('width'):
|
||||||
res = '%dx?' % format['width']
|
res = '%dx?' % format['width']
|
||||||
|
elif is_images:
|
||||||
|
return 'images'
|
||||||
else:
|
else:
|
||||||
res = default
|
return default
|
||||||
if format.get('vcodec') == 'none' and format.get('acodec') == 'none':
|
return f'{res} images' if is_images else res
|
||||||
res += ' (images)'
|
|
||||||
return res
|
|
||||||
|
|
||||||
def _format_note(self, fdict):
|
def _format_note(self, fdict):
|
||||||
res = ''
|
res = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user