Skip to content

Commit

Permalink
Provider (youtube, etc) is now saved in info_dict, so template filena…
Browse files Browse the repository at this point in the history
…me 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.
  • Loading branch information
danut007ro committed Sep 26, 2012
1 parent 3cd98c7 commit ae16f68
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions youtube_dl/FileDownloader.py
Expand Up @@ -341,7 +341,7 @@ def _match_entry(self, info_dict):
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'])
Expand Down Expand Up @@ -475,8 +475,9 @@ def download(self, url_list):
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')

Expand Down

0 comments on commit ae16f68

Please sign in to comment.