]> gitweb @ CieloNegro.org - youtube-dl.git/blobdiff - youtube_dl/__init__.py
Added new option '--list-subs' to show the available subtitle languages
[youtube-dl.git] / youtube_dl / __init__.py
index 914d030a37a523ad4a0662054e0d5714e570d724..e5a7469af25b08f688d43ffae6e0d0db216291c0 100644 (file)
@@ -182,6 +182,9 @@ def parseOpts():
     video_format.add_option('--all-subs',
             action='store_true', dest='allsubtitles',
             help='downloads all the available subtitles of the video (currently youtube only)', default=False)
+    video_format.add_option('--list-subs',
+            action='store_true', dest='listsubtitles',
+            help='lists all available subtitles for the video (currently youtube only)', default=False)
     video_format.add_option('--sub-format',
             action='store', dest='subtitlesformat', metavar='LANG',
             help='subtitle format [srt/sbv] (default=srt) (currently youtube only)', default='srt')
@@ -461,6 +464,7 @@ def _real_main():
         'writesubtitles': opts.writesubtitles,
         'onlysubtitles': opts.onlysubtitles,
         'allsubtitles': opts.allsubtitles,
+        'listsubtitles': opts.listsubtitles,
         'subtitlesformat': opts.subtitlesformat,
         'subtitleslang': opts.subtitleslang,
         'matchtitle': decodeOption(opts.matchtitle),