소스 검색

[youtube] Fix download of subtitles with '--all-subs'

If _extract_subtitles is called the option 'write subtitles' is always true.
Jaime Marquínez Ferrándiz 12 년 전
부모
커밋
df3df7fb64
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      youtube_dl/extractor/youtube.py

+ 3 - 1
youtube_dl/extractor/youtube.py

@@ -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: