aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/YoutubeDL.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-11-14 01:43:20 +0700
committerSergey M․ <dstftw@gmail.com>2017-11-14 01:43:20 +0700
commit5871ebac473e723376722a37baecf51d6ae7d781 (patch)
treeaf9703d2bf0518230a1d9f6c8784df9dd37cebc3 /youtube_dl/YoutubeDL.py
parent05dee6c520eb959316a2e58203cbd5d30e908bc3 (diff)
[YoutubeDL] Fix playlist range optimization for --playlist-items (closes #14740)
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rwxr-xr-xyoutube_dl/YoutubeDL.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index 342d6b47c..68721e9ab 100755
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -948,7 +948,8 @@ class YoutubeDL(object):
report_download(n_entries)
else: # iterable
if playlistitems:
- entries = make_playlistitems_entries(list(ie_entries))
+ entries = make_playlistitems_entries(list(itertools.islice(
+ ie_entries, 0, max(playlistitems))))
else:
entries = list(itertools.islice(
ie_entries, playliststart, playlistend))