aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-05-17 16:11:07 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-05-17 18:24:16 +0530
commit7aee40c13c3198f95f5e5f43e557eae9246d559c (patch)
tree00749643e92785f264184ad037fed62aae69fd0b
parent9297939ec358f24678b566b2bd2211c51f9f99ed (diff)
downloadhypervideo-pre-7aee40c13c3198f95f5e5f43e557eae9246d559c.tar.lz
hypervideo-pre-7aee40c13c3198f95f5e5f43e557eae9246d559c.tar.xz
hypervideo-pre-7aee40c13c3198f95f5e5f43e557eae9246d559c.zip
Fix bug in listing subtitles
Bug introduced by: 2412044c90ef3d122eab0b195aaa0f5b2ab27394
-rw-r--r--yt_dlp/YoutubeDL.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py
index ecf14a0c3..72895eff5 100644
--- a/yt_dlp/YoutubeDL.py
+++ b/yt_dlp/YoutubeDL.py
@@ -3007,9 +3007,9 @@ class YoutubeDL(object):
'Available %s for %s:' % (name, video_id))
def _row(lang, formats):
- exts, names = zip(*((f['ext'], f['name']) for f in reversed(formats)))
+ exts, names = zip(*((f['ext'], f.get('name', 'unknown')) for f in reversed(formats)))
if len(set(names)) == 1:
- names = names[:1]
+ names = [] if names[0] == 'unknown' else names[:1]
return [lang, ', '.join(names), ', '.join(exts)]
self.to_screen(render_table(