diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-09-25 03:31:35 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-09-25 03:31:35 +0530 |
commit | ff1c7fc9d3e54c3584117ce76e2b6ce9da030af2 (patch) | |
tree | 4ad28946d3c0044be7bdd05f732630a4aa4078af /yt_dlp/YoutubeDL.py | |
parent | 600e900300139406a9ad76190bfa4459afbffe6e (diff) | |
download | hypervideo-pre-ff1c7fc9d3e54c3584117ce76e2b6ce9da030af2.tar.lz hypervideo-pre-ff1c7fc9d3e54c3584117ce76e2b6ce9da030af2.tar.xz hypervideo-pre-ff1c7fc9d3e54c3584117ce76e2b6ce9da030af2.zip |
Allow `0` in `--playlist-items`
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r-- | yt_dlp/YoutubeDL.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 2258e22af..11371fa86 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -1464,7 +1464,10 @@ class YoutubeDL(object): )(self, i) entries = [] - for i in playlistitems or itertools.count(playliststart): + items = playlistitems if playlistitems is not None else itertools.count(playliststart) + for i in items: + if i == 0: + continue if playlistitems is None and playlistend is not None and playlistend < i: break entry = None |