From 7aee40c13c3198f95f5e5f43e557eae9246d559c Mon Sep 17 00:00:00 2001 From: pukkandan Date: Mon, 17 May 2021 16:11:07 +0530 Subject: [PATCH] Fix bug in listing subtitles Bug introduced by: 2412044c90ef3d122eab0b195aaa0f5b2ab27394 --- yt_dlp/YoutubeDL.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index ecf14a0c37..72895eff5c 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -3007,9 +3007,9 @@ def list_subtitles(self, video_id, subtitles, name='subtitles'): '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(