Skip to content

Commit

Permalink
Don't treat empty containers as None in sanitize_info
Browse files Browse the repository at this point in the history
  • Loading branch information
pukkandan committed Dec 27, 2021
1 parent 7537e35 commit ceb9832
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions yt_dlp/YoutubeDL.py
Original file line number Diff line number Diff line change
Expand Up @@ -3147,9 +3147,8 @@ def sanitize_info(info_dict, remove_private_keys=False):
'requested_formats', 'requested_subtitles', 'requested_entries', 'entries',
'filepath', 'infojson_filename', 'original_url', 'playlist_autonumber',
}
empty_values = (None, {}, [], set(), tuple())
reject = lambda k, v: k not in keep_keys and (
k.startswith('_') or k in remove_keys or v in empty_values)
k.startswith('_') or k in remove_keys or v is None)
else:
reject = lambda k, v: k in remove_keys

Expand Down

0 comments on commit ceb9832

Please sign in to comment.