aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-04-05 13:01:59 +0200
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-04-09 13:45:52 +0200
commitd39919c03e45b3e8f804c23f78fae33cb4adc7df (patch)
tree634faa4228dcd9ba1a44e6c210fd3d663f9b5411 /youtube_dl
parent14294236bf9623fac4ad748389689b77d52b3547 (diff)
Add progress counter for playlists
Closes #276
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/FileDownloader.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/FileDownloader.py b/youtube_dl/FileDownloader.py
index 2237d355d..ba3277577 100644
--- a/youtube_dl/FileDownloader.py
+++ b/youtube_dl/FileDownloader.py
@@ -492,8 +492,10 @@ class FileDownloader(object):
if info_dict.get('_type','video') == 'playlist':
playlist = info_dict.get('title', None) or info_dict.get('id', None)
self.to_screen(u'[download] Downloading playlist: %s' % playlist)
- for video in info_dict['entries']:
+ n_videos = len(info_dict['entries'])
+ for i,video in enumerate(info_dict['entries'],1):
video['playlist'] = playlist
+ self.to_screen(u'[download] Downloading video #%s of %s' %(i, n_videos))
self.process_info(video)
return