From: Sergey M․ Date: Mon, 13 Nov 2017 18:43:20 +0000 (+0700) Subject: [YoutubeDL] Fix playlist range optimization for --playlist-items (closes #14740) X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=5871ebac473e723376722a37baecf51d6ae7d781;p=youtube-dl [YoutubeDL] Fix playlist range optimization for --playlist-items (closes #14740) --- 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))