mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 06:35:12 +00:00 
			
		
		
		
	Set the extra_info inside YoutubeDL.process_ie_result and set only if the keys are missing
This commit is contained in:
		| @@ -128,6 +128,18 @@ class TestFormatSelection(unittest.TestCase): | ||||
|         downloaded = ydl.downloaded_info_dicts[0] | ||||
|         self.assertEqual(downloaded['format_id'], u'35') | ||||
|  | ||||
|     def test_add_extra_info(self): | ||||
|         test_dict = { | ||||
|             'extractor': 'Foo', | ||||
|         } | ||||
|         extra_info = { | ||||
|             'extractor': 'Bar', | ||||
|             'playlist': 'funny videos', | ||||
|         } | ||||
|         YDL.add_extra_info(test_dict, extra_info) | ||||
|         self.assertEqual(test_dict['extractor'], 'Foo') | ||||
|         self.assertEqual(test_dict['playlist'], 'funny videos') | ||||
|  | ||||
|  | ||||
| if __name__ == '__main__': | ||||
|     unittest.main() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jaime Marquínez Ferrándiz
					Jaime Marquínez Ferrándiz