]> jfr.im git - yt-dlp.git/commitdiff
Ensure `_type` is present in `info.json`
authorpukkandan <redacted>
Sun, 23 Jan 2022 19:31:30 +0000 (01:01 +0530)
committerpukkandan <redacted>
Sun, 23 Jan 2022 19:37:15 +0000 (01:07 +0530)
Closes #2447

yt_dlp/YoutubeDL.py

index d3bcd84a7a6015d3524401ef9ce5f67ac6189628..d1fbd9a875bf92edbb12dda8b408bc38d2c4fd9f 100644 (file)
@@ -3211,6 +3211,7 @@ def sanitize_info(info_dict, remove_private_keys=False):
         if info_dict is None:
             return info_dict
         info_dict.setdefault('epoch', int(time.time()))
+        info_dict.setdefault('_type', 'video')
         remove_keys = {'__original_infodict'}  # Always remove this since this may contain a copy of the entire dict
         keep_keys = ['_type']  # Always keep this to facilitate load-info-json
         if remove_private_keys: