]> git.bitcoin.ninja Git - youtube-dl/commitdiff
Provider (youtube, etc) is now saved in info_dict, so template filename can be someth...
authordanut007ro <danut007ro@yahoo.com>
Wed, 26 Sep 2012 21:35:31 +0000 (00:35 +0300)
committerdanut007ro <danut007ro@yahoo.com>
Wed, 26 Sep 2012 21:35:31 +0000 (00:35 +0300)
This can be useful because videos should also be identified by their providers since id's can be the same on multiple providers.

youtube_dl/FileDownloader.py

index 1c5eeeabe6a7a0a069c864db9936c97385a60caf..793fc3daf3545e0ba43efba716d6a6a18db44b23 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'])
@@ -475,8 +475,9 @@ class FileDownloader(object):
                                videos = ie.extract(url)
                                for video in videos or []:
                                        try:
+                                               video['provider'] = ie.IE_NAME
                                                self.increment_downloads()
-                                               self.process_info(video, ie.IE_NAME)
+                                               self.process_info(video)
                                        except UnavailableVideoError:
                                                self.trouble(u'\nERROR: unable to download video')