aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/YoutubeDL.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-12-16 13:16:20 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2013-12-16 13:16:20 +0100
commita19fd00cc4f799215a942c92fd5c722b3ea499cd (patch)
treef957c546a745e9fed249f17bea4d6837423e2783 /youtube_dl/YoutubeDL.py
parentd66152a8982261f930c2a324c1fc3ba3b3324134 (diff)
Simplify --playlist-start / --playlist-end interface
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rw-r--r--youtube_dl/YoutubeDL.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index 2a4ab674d..2fa34ebc9 100644
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -557,16 +557,16 @@ class YoutubeDL(object):
n_all_entries = len(ie_result['entries'])
playliststart = self.params.get('playliststart', 1) - 1
- playlistend = self.params.get('playlistend', -1)
-
+ playlistend = self.params.get('playlistend', None)
+ # For backwards compatibility, interpret -1 as whole list
if playlistend == -1:
- entries = ie_result['entries'][playliststart:]
- else:
- entries = ie_result['entries'][playliststart:playlistend]
+ playlistend = None
+ entries = ie_result['entries'][playliststart:playlistend]
n_entries = len(entries)
- self.to_screen(u"[%s] playlist '%s': Collected %d video ids (downloading %d of them)" %
+ self.to_screen(
+ u"[%s] playlist '%s': Collected %d video ids (downloading %d of them)" %
(ie_result['extractor'], playlist, n_all_entries, n_entries))
for i, entry in enumerate(entries, 1):