aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2022-08-09 01:49:28 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-08-09 02:01:40 +0530
commitf0ad6f8c510449bf79c818bafd27779f24e2fbbc (patch)
tree761b34f63977541ab1f97fef84acf30e635f9d0d
parent70b2340909d8d917f71d20181614fd7392d3f7f0 (diff)
downloadhypervideo-pre-f0ad6f8c510449bf79c818bafd27779f24e2fbbc.tar.lz
hypervideo-pre-f0ad6f8c510449bf79c818bafd27779f24e2fbbc.tar.xz
hypervideo-pre-f0ad6f8c510449bf79c818bafd27779f24e2fbbc.zip
Remove filtered entries from `-J`
Closes #4369
-rw-r--r--yt_dlp/YoutubeDL.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py
index 228aa7bf5..2b7af4cd7 100644
--- a/yt_dlp/YoutubeDL.py
+++ b/yt_dlp/YoutubeDL.py
@@ -1797,6 +1797,8 @@ class YoutubeDL:
})
if self._match_entry(entry_copy, incomplete=True) is not None:
+ # For compatabilty with youtube-dl. See https://github.com/yt-dlp/yt-dlp/issues/4369
+ resolved_entries[i] = (playlist_index, NO_DEFAULT)
continue
self.to_screen('[download] Downloading video %s of %s' % (
@@ -1817,7 +1819,8 @@ class YoutubeDL:
resolved_entries[i] = (playlist_index, entry_result)
# Update with processed data
- ie_result['requested_entries'], ie_result['entries'] = tuple(zip(*resolved_entries)) or ([], [])
+ ie_result['requested_entries'] = [i for i, e in resolved_entries if e is not NO_DEFAULT]
+ ie_result['entries'] = [e for _, e in resolved_entries if e is not NO_DEFAULT]
# Write the updated info to json
if _infojson_written is True and self._write_info_json(