From: Ricardo Garcia Date: Mon, 4 May 2009 17:31:00 +0000 (+0200) Subject: Add an "epoch" keyword to the output template X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=ad274509aa1eba53d41f15e5226b81419991af64;p=youtube-dl Add an "epoch" keyword to the output template --- diff --git a/youtube-dl b/youtube-dl index 2708fe4e7..db9510f7b 100755 --- 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))