aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/youtube.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-07-29 21:18:16 +0600
committerSergey M․ <dstftw@gmail.com>2015-07-29 21:18:16 +0600
commit5e1eddb939a4fbc2a5ef10111c8141c842cf01d6 (patch)
tree28a52251797022893b0af119a8a88d30b9ba8a48 /youtube_dl/extractor/youtube.py
parentd8f0a9ecea6aab5b148d06904934c6a504ba3b03 (diff)
[youtube] Show info message for multifeed videos according to noplaylist option
Diffstat (limited to 'youtube_dl/extractor/youtube.py')
-rw-r--r--youtube_dl/extractor/youtube.py37
1 files changed, 21 insertions, 16 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index bcd27408d..8a5ef2e70 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -1089,22 +1089,27 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
else:
video_description = ''
- if (not self._downloader.params.get('noplaylist') and
- not smuggled_data.get('force_singlefeed', False) and
- 'multifeed_metadata_list' in video_info):
- entries = []
- multifeed_metadata_list = compat_urllib_parse_unquote_plus(video_info['multifeed_metadata_list'][0])
- for feed in multifeed_metadata_list.split(','):
- feed_data = compat_parse_qs(feed)
- entries.append({
- '_type': 'url_transparent',
- 'ie_key': 'Youtube',
- 'url': smuggle_url(
- '%s://www.youtube.com/watch?v=%s' % (proto, feed_data['id'][0]),
- {'force_singlefeed': True}),
- 'title': '%s (%s)' % (video_title, feed_data['title'][0]),
- })
- return self.playlist_result(entries, video_id, video_title, video_description)
+ if 'multifeed_metadata_list' in video_info and not smuggled_data.get('force_singlefeed', False):
+ if not self._downloader.params.get('noplaylist'):
+ entries = []
+ feed_ids = []
+ multifeed_metadata_list = compat_urllib_parse_unquote_plus(video_info['multifeed_metadata_list'][0])
+ for feed in multifeed_metadata_list.split(','):
+ feed_data = compat_parse_qs(feed)
+ entries.append({
+ '_type': 'url_transparent',
+ 'ie_key': 'Youtube',
+ 'url': smuggle_url(
+ '%s://www.youtube.com/watch?v=%s' % (proto, feed_data['id'][0]),
+ {'force_singlefeed': True}),
+ 'title': '%s (%s)' % (video_title, feed_data['title'][0]),
+ })
+ feed_ids.append(feed_data['id'][0])
+ self.to_screen(
+ 'Downloading multifeed video (%s) - add --no-playlist to just download video %s'
+ % (', '.join(feed_ids), video_id))
+ return self.playlist_result(entries, video_id, video_title, video_description)
+ self.to_screen('Downloading just video %s because of --no-playlist' % video_id)
if 'view_count' in video_info:
view_count = int(video_info['view_count'][0])