1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2025-01-07 13:47:54 +01:00

stuff and stuff

This commit is contained in:
Mark 2017-04-05 18:19:50 -04:00
parent 611058327f
commit 21e8ffb8c7
3 changed files with 10 additions and 8 deletions

View File

@ -922,9 +922,9 @@ class YoutubeDL(object):
x_forwarded_for = ie_result.get('__x_forwarded_for_ip')
if self.params.get('date_playlist_order') == 'desc' and self.params.get('playlist_reverse'):
if self.params.get('date_playlist_order') == 'desc' and self.params.get('playlistreverse'):
entries.reverse()
elif self.params.get('date_playlist_order') == 'asc' and not self.params.get('playlist_reverse'):
elif self.params.get('date_playlist_order') == 'asc' and not self.params.get('playlistreverse'):
entries.reverse()
for i, entry in enumerate(entries, 1):
@ -954,10 +954,11 @@ class YoutubeDL(object):
download=download,
extra_info=extra)
entry_result_uploaddate = entry_result.get('upload_date')
if entry_result_uploaddate:
if self.params.get('date_playlist_order') in ('desc', 'asc') and entry_result_uploaddate not in self.params.get('daterange'):
break
if entry_result is not None: # backwards compatibility, lol
entry_result_uploaddate = entry_result.get('upload_date')
if entry_result_uploaddate:
if self.params.get('date_playlist_order') in ('desc', 'asc') and entry_result_uploaddate not in self.params.get('daterange'):
break
playlist_results.append(entry_result)

View File

@ -352,6 +352,7 @@ def _real_main(argv=None):
'playlistend': opts.playlistend,
'playlistreverse': opts.playlist_reverse,
'playlistrandom': opts.playlist_random,
'date_playlist_order': opts.date_playlist_order,
'noplaylist': opts.noplaylist,
'logtostderr': opts.outtmpl == '-',
'consoletitle': opts.consoletitle,

View File

@ -489,11 +489,11 @@ def parseOpts(overrideArguments=None):
help=optparse.SUPPRESS_HELP)
downloader.add_option(
'--playlist-reverse',
dest='playlist_reverse', action='store_true',
action='store_true',
help='Download playlist videos in reverse order')
downloader.add_option(
'--playlist-random',
dest='playlist_random', action='store_true',
action='store_true',
help='Download playlist videos in random order')
downloader.add_option(
'--xattr-set-filesize',