diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index 19370f62b..d0cc24be4 100755 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -938,6 +938,9 @@ class YoutubeDL(object): '[%s] playlist %s: Downloading %d videos' % (ie_result['extractor'], playlist, num_entries)) + if self.params.get('playlistreverse', False): + ie_entries = ie_entries[::-1] + if isinstance(ie_entries, list): n_all_entries = len(ie_entries) if playlistitems: @@ -970,9 +973,6 @@ class YoutubeDL(object): n_entries = len(entries) report_download(n_entries) - if self.params.get('playlistreverse', False): - entries = entries[::-1] - if self.params.get('playlistrandom', False): random.shuffle(entries)