1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-31 14:45:14 +00:00

Add --compat-option playlist-match-filter

Closes #6073
This commit is contained in:
pukkandan
2023-06-21 04:31:39 +05:30
parent 97afb093d4
commit 93b39cdbd9
3 changed files with 9 additions and 8 deletions

View File

@@ -1403,7 +1403,7 @@ class YoutubeDL:
def _match_entry(self, info_dict, incomplete=False, silent=False):
"""Returns None if the file should be downloaded"""
_type = info_dict.get('_type', 'video')
_type = 'video' if 'playlist-match-filter' in self.params['compat_opts'] else info_dict.get('_type', 'video')
assert incomplete or _type == 'video', 'Only video result can be considered complete'
video_title = info_dict.get('title', info_dict.get('id', 'entry'))