mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 14:45:14 +00:00 
			
		
		
		
	[ie] Migrate commonly plural fields to lists (#8917)
Authored by: llistochek, pukkandan Related: #3944
This commit is contained in:
		| @@ -223,6 +223,10 @@ def sanitize_got_info_dict(got_dict): | ||||
|     if test_info_dict.get('display_id') == test_info_dict.get('id'): | ||||
|         test_info_dict.pop('display_id') | ||||
| 
 | ||||
|     # Remove deprecated fields | ||||
|     for old in YoutubeDL._deprecated_multivalue_fields.keys(): | ||||
|         test_info_dict.pop(old, None) | ||||
| 
 | ||||
|     # release_year may be generated from release_date | ||||
|     if try_call(lambda: test_info_dict['release_year'] == int(test_info_dict['release_date'][:4])): | ||||
|         test_info_dict.pop('release_year') | ||||
|   | ||||
| @@ -941,7 +941,7 @@ class TestYoutubeDL(unittest.TestCase): | ||||
|         def get_videos(filter_=None): | ||||
|             ydl = YDL({'match_filter': filter_, 'simulate': True}) | ||||
|             for v in videos: | ||||
|                 ydl.process_ie_result(v, download=True) | ||||
|                 ydl.process_ie_result(v.copy(), download=True) | ||||
|             return [v['id'] for v in ydl.downloaded_info_dicts] | ||||
| 
 | ||||
|         res = get_videos() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Lev
					Lev