aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-02-05 20:13:28 +0600
committerSergey M․ <dstftw@gmail.com>2015-02-05 20:13:28 +0600
commit9e91449c8d1dae53eda6fb250384f0afa5122ce6 (patch)
tree3ab491696635a283c51590e8d7add0a545d07ad6 /youtube_dl
parent25e5ebf382b2fca9d4b6909ac1ac9b5af89bcdd9 (diff)
[npo] Fix subtitles (Closes #3638)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/npo.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/youtube_dl/extractor/npo.py b/youtube_dl/extractor/npo.py
index 0580461bb..54be06a4e 100644
--- a/youtube_dl/extractor/npo.py
+++ b/youtube_dl/extractor/npo.py
@@ -159,14 +159,17 @@ class NPOIE(NPOBaseIE):
'quality': stream.get('kwaliteit'),
})
- subtitles = {}
+ self._sort_formats(formats)
- tt888 = metadata.get('tt888')
- if self._have_to_download_any_subtitles and tt888 == 'ja':
+ subtitles = {}
+ if metadata.get('tt888') == 'ja':
subtitles['nl'] = 'http://e.omroep.nl/tt888/%s' % video_id
- subtitles = self.extract_subtitles(video_id, subtitles)
- self._sort_formats(formats)
+ if self._downloader.params.get('listsubtitles', False):
+ self._list_available_subtitles(video_id, subtitles)
+ return
+
+ subtitles = self.extract_subtitles(video_id, subtitles)
return {
'id': video_id,