aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/__init__.py
diff options
context:
space:
mode:
authorIsmael Mejia <iemejia@gmail.com>2013-02-22 04:50:05 +0100
committerFilippo Valsorda <filippo.valsorda@gmail.com>2013-03-20 08:41:54 +0100
commit2a4093eaf3af07fa0a74926ce09cb49aba73017e (patch)
tree8c993997506e889bd2f3f72f2964aa32f5b5a848 /youtube_dl/__init__.py
parent9e62bc443996c1950de0841997c76d110cb77c6e (diff)
Added new option '--list-subs' to show the available subtitle languages
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r--youtube_dl/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py
index 914d030a3..e5a7469af 100644
--- a/youtube_dl/__init__.py
+++ b/youtube_dl/__init__.py
@@ -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),