Skip to content

Commit

Permalink
[generic] Correct apply order on playlist-reverse (closes #6845)
Browse files Browse the repository at this point in the history
  • Loading branch information
ALurker authored and ALurker committed Aug 26, 2018
1 parent e0b6e98 commit 38892da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions youtube_dl/YoutubeDL.py
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,9 @@ def report_download(num_entries):
'[%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:
Expand Down Expand Up @@ -964,9 +967,6 @@ def report_download(num_entries):
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)

Expand Down

0 comments on commit 38892da

Please sign in to comment.