From fd174ae83d5ad962ccbf5639c360943ac942b22e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Paprota?= Date: Fri, 28 Jan 2011 10:29:20 +0100 Subject: [PATCH] Added support for playlist start/end parameters. --- youtube-dl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/youtube-dl b/youtube-dl index 6ecf04615..8552b9988 100755 --- a/youtube-dl +++ b/youtube-dl @@ -2187,7 +2187,16 @@ class YoutubeUserIE(InfoExtractor): pagenum += 1 - self._downloader.to_screen("[youtube] user %s: Collected %d video ids" % (username, len(video_ids))) + all_ids_count = len(video_ids) + playliststart = self._downloader.params.get('playliststart', 1) - 1 + playlistend = self._downloader.params.get('playlistend', -1) + + if playlistend == -1: + video_ids = video_ids[playliststart:] + else: + video_ids = video_ids[playliststart:playlistend] + + self._downloader.to_screen("[youtube] user %s: Collected %d video ids (downloading %d of them)" % (username, all_ids_count, len(video_ids))) for video_id in video_ids: try: