commit: ad274509aa1eba53d41f15e5226b81419991af64
parent d09744d0553650065195a212a826e4267bcfed7b
Author: Ricardo Garcia <sarbalap+freshmeat@gmail.com>
Date: Mon, 4 May 2009 19:31:00 +0200
Add an "epoch" keyword to the output template
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/youtube-dl b/youtube-dl
@@ -260,7 +260,9 @@ class FileDownloader(object):
return
try:
- filename = self.params['outtmpl'] % info_dict
+ template_dict = dict(info_dict)
+ template_dict['epoch'] = unicode(long(time.time()))
+ filename = self.params['outtmpl'] % template_dict
self.report_destination(filename)
except (ValueError, KeyError), err:
self.trouble('ERROR: invalid output template or system charset: %s' % str(err))