aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authordanut007ro <danut007ro@yahoo.com>2012-09-27 00:35:31 +0300
committerdanut007ro <danut007ro@yahoo.com>2012-09-27 00:35:31 +0300
commitae16f68f4abd67bf9b0386537620ca17c342ff98 (patch)
tree7505d1b7424cb0512f21b334b4b5f04851e3e603 /youtube_dl
parent3cd98c7894d2523752230d9fa3307e6e39723218 (diff)
Provider (youtube, etc) is now saved in info_dict, so template filename can be something like %(provider)s_%(id)s.%(ext)s
This can be useful because videos should also be identified by their providers since id's can be the same on multiple providers.
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/FileDownloader.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/FileDownloader.py b/youtube_dl/FileDownloader.py
index 1c5eeeabe..793fc3daf 100644
--- a/youtube_dl/FileDownloader.py
+++ b/youtube_dl/FileDownloader.py
@@ -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')