Reject entire playlists faster with --match-filter

Rejected based on `playlist_id` etc can be checked before any entries are extracted

Related: #4383
This commit is contained in:
pukkandan 2022-07-26 09:28:37 +05:30
parent 7d0f6f0c45
commit 3bec830a59
No known key found for this signature in database
GPG key ID: 7EEE9E1E817D0A39
3 changed files with 39 additions and 32 deletions

View file

@ -3666,7 +3666,7 @@ def match_filter_func(filters):
if not filters or any(match_str(f, info_dict, incomplete) for f in filters):
return NO_DEFAULT if interactive and not incomplete else None
else:
video_title = info_dict.get('title') or info_dict.get('id') or 'video'
video_title = info_dict.get('title') or info_dict.get('id') or 'entry'
filter_str = ') | ('.join(map(str.strip, filters))
return f'{video_title} does not pass filter ({filter_str}), skipping ..'
return _match_func