diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-08-17 19:02:06 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-08-17 19:06:10 +0530 |
commit | 9e598870dd66f818c394bf08a57f2a8a497b83a6 (patch) | |
tree | 150bfcfdd993ffac4d920d89b5384bcd9b143fb6 /yt_dlp/YoutubeDL.py | |
parent | 8f18aca8717bb0dd49054555af8d386e5eda3a88 (diff) | |
download | hypervideo-pre-9e598870dd66f818c394bf08a57f2a8a497b83a6.tar.lz hypervideo-pre-9e598870dd66f818c394bf08a57f2a8a497b83a6.tar.xz hypervideo-pre-9e598870dd66f818c394bf08a57f2a8a497b83a6.zip |
Fix `playlist_index` not obeying `playlist_start`
and add tests
Closes #720
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r-- | yt_dlp/YoutubeDL.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index eef3f8b4c..62525cfb5 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -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 |