diff options
| author | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2015-02-17 22:59:19 +0100 | 
|---|---|---|
| committer | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2015-02-17 22:59:19 +0100 | 
| commit | edab9dbf4d00a7f76fbfd2df9ef4b205c88e47a8 (patch) | |
| tree | 419bc79206fdcffa0f82138672bc228232318110 | |
| parent | 9868ea493626a3a81d30d084fd00d22982a0f86a (diff) | |
[YoutubeDL] use the 'render_table' function for listing the subtitles
| -rwxr-xr-x | youtube_dl/YoutubeDL.py | 11 | 
1 files changed, 5 insertions, 6 deletions
| diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index a47f8f5de..f8b8fb0c1 100755 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -1659,13 +1659,12 @@ class YoutubeDL(object):          if not subtitles:              self.to_screen('%s has no %s' % (video_id, name))              return -        header_line = 'Language    formats' -        sub_lines = [ -            '%-12s%s' % (lang, ', '.join(f['ext'] for f in reversed(formats))) -            for lang, formats in subtitles.items()]          self.to_screen( -            'Available %s for %s:\n%s\n%s' % -            (name, video_id, header_line, '\n'.join(sub_lines))) +            'Available %s for %s:' % (name, video_id)) +        self.to_screen(render_table( +            ['Language', 'formats'], +            [[lang, ', '.join(f['ext'] for f in reversed(formats))] +                for lang, formats in subtitles.items()]))      def urlopen(self, req):          """ Start an HTTP download """ | 
