1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2025-01-08 14:17: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') 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() 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() entries.reverse()
for i, entry in enumerate(entries, 1): for i, entry in enumerate(entries, 1):
@ -954,10 +954,11 @@ class YoutubeDL(object):
download=download, download=download,
extra_info=extra) extra_info=extra)
entry_result_uploaddate = entry_result.get('upload_date') if entry_result is not None: # backwards compatibility, lol
if entry_result_uploaddate: entry_result_uploaddate = entry_result.get('upload_date')
if self.params.get('date_playlist_order') in ('desc', 'asc') and entry_result_uploaddate not in self.params.get('daterange'): if entry_result_uploaddate:
break 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) playlist_results.append(entry_result)

View File

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

View File

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