aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-10-11 17:25:37 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-10-11 17:27:39 +0530
commita903d8285c96b2c7ac7915f228a17e84cbfe3ba4 (patch)
tree67bebd19afee21f3adb27cc531d1869651afc86b
parent9dda99f2fca7342c8f19150ac8730d67fceed42d (diff)
downloadhypervideo-pre-a903d8285c96b2c7ac7915f228a17e84cbfe3ba4.tar.lz
hypervideo-pre-a903d8285c96b2c7ac7915f228a17e84cbfe3ba4.tar.xz
hypervideo-pre-a903d8285c96b2c7ac7915f228a17e84cbfe3ba4.zip
Fix bug in storyboards
Caused by 9359f3d4f02856128f5626e754c7f64e2232b02f
-rw-r--r--yt_dlp/YoutubeDL.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py
index 59a3e3df1..8878d710f 100644
--- a/yt_dlp/YoutubeDL.py
+++ b/yt_dlp/YoutubeDL.py
@@ -3072,6 +3072,7 @@ class YoutubeDL(object):
@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 @@ class YoutubeDL(object):
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 = ''