Now --all-sub is a modifier to --write-sub and --write-auto-sub (closes #1412)

For keeping backwards compatibility --all-sub sets --write-sub if --write-auto-sub is not given
This commit is contained in:
Jaime Marquínez Ferrándiz 2013-09-14 11:14:40 +02:00
parent fad84d50fe
commit 0b7f31184d
5 changed files with 13 additions and 5 deletions

View file

@ -74,6 +74,7 @@ class YoutubeDL(object):
writesubtitles: Write the video subtitles to a file
writeautomaticsub: Write the automatic subtitles to a file
allsubtitles: Downloads all the subtitles of the video
(requires writesubtitles or writeautomaticsub)
listsubtitles: Lists all available subtitles for the video
subtitlesformat: Subtitle format [srt/sbv/vtt] (default=srt)
subtitleslangs: List of languages of the subtitles to download
@ -499,8 +500,7 @@ class YoutubeDL(object):
return
subtitles_are_requested = any([self.params.get('writesubtitles', False),
self.params.get('writeautomaticsub'),
self.params.get('allsubtitles', False)])
self.params.get('writeautomaticsub')])
if subtitles_are_requested and 'subtitles' in info_dict and info_dict['subtitles']:
# subtitles download errors are already managed as troubles in relevant IE