Fix playlist_index not obeying playlist_start
and add tests Closes #720
This commit is contained in:
parent
8f18aca871
commit
9e598870dd
2 changed files with 25 additions and 48 deletions
|
|
@ -1452,7 +1452,7 @@ class YoutubeDL(object):
|
|||
|
||||
# Save playlist_index before re-ordering
|
||||
entries = [
|
||||
((playlistitems[i - 1] if playlistitems else i), entry)
|
||||
((playlistitems[i - 1] if playlistitems else i + playliststart - 1), entry)
|
||||
for i, entry in enumerate(entries, 1)
|
||||
if entry is not None]
|
||||
n_entries = len(entries)
|
||||
|
|
@ -1517,7 +1517,7 @@ class YoutubeDL(object):
|
|||
max_failures = self.params.get('skip_playlist_after_errors') or float('inf')
|
||||
for i, entry_tuple in enumerate(entries, 1):
|
||||
playlist_index, entry = entry_tuple
|
||||
if 'playlist_index' in self.params.get('compat_options', []):
|
||||
if 'playlist-index' in self.params.get('compat_options', []):
|
||||
playlist_index = playlistitems[i - 1] if playlistitems else i
|
||||
self.to_screen('[download] Downloading video %s of %s' % (i, n_entries))
|
||||
# This __x_forwarded_for_ip thing is a bit ugly but requires
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue