1
0
Fork 0
mirror of https://gitlab.com/dstftw/youtube-dl.git synced 2020-11-16 09:42:26 +00:00

[YoutubeDL] Fix playlist range optimization for --playlist-items (closes #14740)

This commit is contained in:
Sergey M․ 2017-11-14 01:43:20 +07:00
parent 05dee6c520
commit 5871ebac47
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D

View file

@ -948,7 +948,8 @@ class YoutubeDL(object):
report_download(n_entries) report_download(n_entries)
else: # iterable else: # iterable
if playlistitems: if playlistitems:
entries = make_playlistitems_entries(list(ie_entries)) entries = make_playlistitems_entries(list(itertools.islice(
ie_entries, 0, max(playlistitems))))
else: else:
entries = list(itertools.islice( entries = list(itertools.islice(
ie_entries, playliststart, playlistend)) ie_entries, playliststart, playlistend))