[youtube] Fix download of subtitles with '--all-subs'
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Fri, 23 Aug 2013 11:14:22 +0000 (13:14 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Fri, 23 Aug 2013 11:14:22 +0000 (13:14 +0200)
If _extract_subtitles is called the option 'write subtitles' is always true.

youtube_dl/extractor/youtube.py

index c4d763ee1a3c285b01e74903fefae6dd2ccf804b..446d53f644114e40915a821d63b0d61d6ed19d0d 100644 (file)
@@ -534,7 +534,9 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
         sub_format = self._downloader.params.get('subtitlesformat')
         if  not sub_lang_list: #There was some error, it didn't get the available subtitles
             return {}
-        if self._downloader.params.get('writesubtitles', False):
+        if self._downloader.params.get('allsubtitles', False):
+            pass
+        else:
             if self._downloader.params.get('subtitleslang', False):
                 sub_lang = self._downloader.params.get('subtitleslang')
             elif 'en' in sub_lang_list: