mirror of
https://github.com/l1ving/youtube-dl
synced 2020-11-18 19:53:54 -08:00
[generic] Correct apply order on playlist-reverse (closes #6845)
This commit is contained in:
parent
705b1cda99
commit
7b6c5acc4b
@ -937,6 +937,9 @@ class YoutubeDL(object):
|
|||||||
'[%s] playlist %s: Downloading %d videos' %
|
'[%s] playlist %s: Downloading %d videos' %
|
||||||
(ie_result['extractor'], playlist, num_entries))
|
(ie_result['extractor'], playlist, num_entries))
|
||||||
|
|
||||||
|
if self.params.get('playlistreverse', False):
|
||||||
|
ie_entries = ie_entries[::-1]
|
||||||
|
|
||||||
if isinstance(ie_entries, list):
|
if isinstance(ie_entries, list):
|
||||||
n_all_entries = len(ie_entries)
|
n_all_entries = len(ie_entries)
|
||||||
if playlistitems:
|
if playlistitems:
|
||||||
@ -969,9 +972,6 @@ class YoutubeDL(object):
|
|||||||
n_entries = len(entries)
|
n_entries = len(entries)
|
||||||
report_download(n_entries)
|
report_download(n_entries)
|
||||||
|
|
||||||
if self.params.get('playlistreverse', False):
|
|
||||||
entries = entries[::-1]
|
|
||||||
|
|
||||||
if self.params.get('playlistrandom', False):
|
if self.params.get('playlistrandom', False):
|
||||||
random.shuffle(entries)
|
random.shuffle(entries)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user