Repository: yt-dlp
Issue: `--playlist-end N` downloads items from at most `N` playlists
Labels: enhancement

### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I remove or skip any mandatory\* field

### Checklist

- [X] I'm reporting a bug unrelated to a specific site
- [X] I've verified that I'm running yt-dlp version **2022.11.11** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit)
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/yt-dlp/yt-dlp/wiki/FAQ#video-url-contains-an-ampersand--and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)
- [X] I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)

### Provide a description that is worded well enough to be understood

The `--playlist-end` option parameter affects both how many playlists are downloaded from, and how many items from each playlist are downloaded. Only the latter is expected.

For example, for youtube channel URLs, `--playlist-end 1` downloads the first video from the Videos tab (1 video), `--playlist-end 2` downloads the first two videos from the Videos and Live tabs (4 videos). `--playlist-end 3` downloads the first three videos from the Videos, Live and Shorts tabs (9 videos), and so on.

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
[debug] Command-line config: ['https://www.youtube.com/@Whale_stream', '-vU', '--playlist-end', '1']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.11.11 [8b644025b]
[debug] Lazy loading extractors is disabled
[debug] Python 3.10.6 (CPython AMD64 64bit) - Windows-10-10.0.19044-SP0 (OpenSSL 1.1.1n  15 Mar 2022)
[debug] exe versions: ffmpeg 5.1-essentials_build-www.gyan.dev (setts), ffprobe 5.1-essentials_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.09.24, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1725 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.11.11, Current version: 2022.11.11
yt-dlp is up to date (2022.11.11)
[debug] [youtube:tab] Extracting URL: https://www.youtube.com/@Whale_stream
[youtube:tab] @Whale_stream: Downloading webpage
[debug] [youtube:tab] Selected tab: 'videos' (videos), Requested tab: ''
[youtube:tab] Downloading all uploads of the channel. To download only the videos in a specific tab, pass the tab's URL
[youtube:tab] @Whale_stream/streams: Downloading webpage
[debug] [youtube:tab] Selected tab: 'streams' (live), Requested tab: 'streams'
[youtube:tab] @Whale_stream/shorts: Downloading webpage
[debug] [youtube:tab] Selected tab: 'shorts' (shorts), Requested tab: 'shorts'
[youtube:tab] Downloading as multiple playlists, separated by tabs. To download as a single playlist instead, pass https://www.youtube.com/playlist?list=UUDWzETCvjmDp27kbKB_-smA
[download] Downloading playlist: Whale
[youtube:tab] Playlist Whale: Downloading 1 items of 3
[download] Downloading item 1 of 1
[download] Downloading playlist: Whale - Videos
[youtube:tab] Playlist Whale - Videos: Downloading 1 items
[download] Downloading item 1 of 1
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=Ssehcir65l4
[youtube] Ssehcir65l4: Downloading webpage
[youtube] Ssehcir65l4: Downloading android player API JSON
WARNING: [youtube] IncompleteRead(9080 bytes read, 3329 more expected). Retrying (1/3)...
[youtube] Ssehcir65l4: Downloading android player API JSON
[debug] Loading youtube-nsig.4eb6b35d from cache
[debug] [youtube] Decrypted nsig Yu9o3cVmWodVqau => mYsOPsDAgK2S2A
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] Ssehcir65l4: Downloading 1 format(s): 308+251
[debug] Invoking http downloader on "https://rr5---sn-xap5-ixa6.googlevideo.com/videoplayback?expire=1669465485&ei=LbGBY6vWBa6Y7AT5irHQBQ&ip=2001%3A999%3A680%3A127e%3Af447%3A23ff%3Adc57%3A6452&id=o-AN0-0p_OUWYOWVmmVFRSw58uqDjXG7Xncpa-SWHNgp4Z&itag=308&source=youtube&requiressl=yes&mh=pC&mm=31%2C29&mn=sn-xap5-ixa6%2Csn-ixh7yn7e&ms=au%2Crdu&mv=m&mvi=5&pl=52&initcwndbps=1691250&spc=SFxXNoA1I9GdcyeasVg8ym_pEVC0wZc&vprv=1&svpuc=1&mime=video%2Fwebm&gir=yes&clen=24988226&dur=19.733&lmt=1635255879614653&mt=1669443446&fvip=5&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5316224&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAI_NeFpUmK31jc2alcEegwRQaDv2GWe4rYfVekHgWQJfAiEApQGA_zQKDL6HQ42lYhywJkrLHZvwIqr8Wk4sxhRHY5Y%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgYxchHDZ9Et3Y4DGAq1P5ipaaW5Z4FLj7Q6ufBIpOo44CIG1__gWOfEcqgzJPKPc4nzzNU8cTuXCuE_KZJbqhxVVj"
[debug] File locking is not supported. Proceeding without locking
[download] Destination: US Delta Force Plan (SECRET) (DO NOT SHARE) [Ssehcir65l4].f308.webm
[download] 100% of   23.83MiB in 00:00:14 at 1.62MiB/s
[debug] Invoking http downloader on "https://rr5---sn-xap5-ixa6.googlevideo.com/videoplayback?expire=1669465485&ei=LbGBY6vWBa6Y7AT5irHQBQ&ip=2001%3A999%3A680%3A127e%3Af447%3A23ff%3Adc57%3A6452&id=o-AN0-0p_OUWYOWVmmVFRSw58uqDjXG7Xncpa-SWHNgp4Z&itag=251&source=youtube&requiressl=yes&mh=pC&mm=31%2C29&mn=sn-xap5-ixa6%2Csn-ixh7yn7e&ms=au%2Crdu&mv=m&mvi=5&pl=52&initcwndbps=1691250&spc=SFxXNoA1I9GdcyeasVg8ym_pEVC0wZc&vprv=1&svpuc=1&mime=audio%2Fwebm&gir=yes&clen=313100&dur=19.761&lmt=1635255836648034&mt=1669443446&fvip=5&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5311224&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIgGQGf5tvXEQ-DH5os-CpWNSvJtj6HXJCxuMg9n2UdQt4CIQCmsGpnMAiscNmgk8KMQ3N6SPwE-D1LhDc6utRQXwPG-w%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgYxchHDZ9Et3Y4DGAq1P5ipaaW5Z4FLj7Q6ufBIpOo44CIG1__gWOfEcqgzJPKPc4nzzNU8cTuXCuE_KZJbqhxVVj"
[download] Destination: US Delta Force Plan (SECRET) (DO NOT SHARE) [Ssehcir65l4].f251.webm
[download] 100% of  305.76KiB in 00:00:00 at 675.22KiB/s
[Merger] Merging formats into "US Delta Force Plan (SECRET) (DO NOT SHARE) [Ssehcir65l4].webm"
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:US Delta Force Plan (SECRET) (DO NOT SHARE) [Ssehcir65l4].f308.webm" -i "file:US Delta Force Plan (SECRET) (DO NOT SHARE) [Ssehcir65l4].f251.webm" -c copy -map "0:v:0" -map "1:a:0" -movflags "+faststart" "file:US Delta Force Plan (SECRET) (DO NOT SHARE) [Ssehcir65l4].temp.webm"
Deleting original file US Delta Force Plan (SECRET) (DO NOT SHARE) [Ssehcir65l4].f251.webm (pass -k to keep)
Deleting original file US Delta Force Plan (SECRET) (DO NOT SHARE) [Ssehcir65l4].f308.webm (pass -k to keep)
[download] Finished downloading playlist: Whale - Videos
[download] Finished downloading playlist: Whale
```