]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[YoutubeDL] Fix playlist range optimization for --playlist-items (closes #14740)
authorSergey M․ <dstftw@gmail.com>
Mon, 13 Nov 2017 18:43:20 +0000 (01:43 +0700)
committerSergey M․ <dstftw@gmail.com>
Mon, 13 Nov 2017 18:43:20 +0000 (01:43 +0700)
youtube_dl/YoutubeDL.py

index 342d6b47c03cc817994662eeed5d9245f45609de..68721e9ab81a3bbebac8846d52ed6bd7f92e05c9 100755 (executable)
@@ -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))