1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-12-23 01:08:10 +00:00

Add progress counter for playlists

Closes #276
This commit is contained in:
Jaime Marquínez Ferrándiz 2013-04-05 13:01:59 +02:00
parent 14294236bf
commit d39919c03e

View file

@ -492,8 +492,10 @@ class FileDownloader(object):
if info_dict.get('_type','video') == 'playlist': if info_dict.get('_type','video') == 'playlist':
playlist = info_dict.get('title', None) or info_dict.get('id', None) playlist = info_dict.get('title', None) or info_dict.get('id', None)
self.to_screen(u'[download] Downloading playlist: %s' % playlist) 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 video['playlist'] = playlist
self.to_screen(u'[download] Downloading video #%s of %s' %(i, n_videos))
self.process_info(video) self.process_info(video)
return return