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 Mar 26, 2020
1 parent 049c048 commit 3c69159
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 @@ -938,6 +938,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 @@ -970,9 +973,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 3c69159

Please sign in to comment.