aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
Diffstat (limited to 'youtube_dl')
-rwxr-xr-xyoutube_dl/YoutubeDL.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index f8b8fb0c1..088b111eb 100755
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -1164,8 +1164,10 @@ class YoutubeDL(object):
if lang not in available_subs:
available_subs[lang] = cap_info
- if not available_subs:
- return available_subs
+ if (not self.params.get('writesubtitles') and not
+ self.params.get('writeautomaticsub') or not
+ available_subs):
+ return None
if self.params.get('allsubtitles', False):
requested_langs = available_subs.keys()