Add new field "extractor" to the info dictionary
[youtube-dl] / youtube_dl / FileDownloader.py
index 1c5eeeabe6a7a0a069c864db9936c97385a60caf..38c6a519a0e5008c78d80cca2f83b135f98f9713 100644 (file)
@@ -341,7 +341,7 @@ class FileDownloader(object):
                        return u'"' + title + '" title matched reject pattern "' + rejecttitle + '"'
                return None
 
-       def process_info(self, info_dict, provider):
+       def process_info(self, info_dict):
                """Process a single dictionary returned by an InfoExtractor."""
 
                info_dict['stitle'] = sanitize_filename(info_dict['title'])
@@ -474,9 +474,10 @@ class FileDownloader(object):
                                # Extract information from URL and process it
                                videos = ie.extract(url)
                                for video in videos or []:
+                                       video['extractor'] = ie.IE_NAME
                                        try:
                                                self.increment_downloads()
-                                               self.process_info(video, ie.IE_NAME)
+                                               self.process_info(video)
                                        except UnavailableVideoError:
                                                self.trouble(u'\nERROR: unable to download video')