aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-09-03 06:34:55 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-09-04 01:39:27 +0530
commit8113999995063c8f5c98d6b8c9aa1d5f9ccc0da2 (patch)
treeb704f4438728a2078eebbd07365a1f6b08b3314e
parent8026e5015274f3899f5db2d43eaaecdfc7d94ffd (diff)
downloadhypervideo-pre-8113999995063c8f5c98d6b8c9aa1d5f9ccc0da2.tar.lz
hypervideo-pre-8113999995063c8f5c98d6b8c9aa1d5f9ccc0da2.tar.xz
hypervideo-pre-8113999995063c8f5c98d6b8c9aa1d5f9ccc0da2.zip
Fix `--compat-option playlist-index`
-rw-r--r--yt_dlp/YoutubeDL.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py
index 7da25a7ba..913512387 100644
--- a/yt_dlp/YoutubeDL.py
+++ b/yt_dlp/YoutubeDL.py
@@ -1531,8 +1531,8 @@ 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', []):
- playlist_index = playlistitems[i - 1] if playlistitems else i
+ if 'playlist-index' in self.params.get('compat_opts', []):
+ playlist_index = playlistitems[i - 1] if playlistitems else i + playliststart - 1
self.to_screen('[download] Downloading video %s of %s' % (i, n_entries))
# This __x_forwarded_for_ip thing is a bit ugly but requires
# minimal changes