From ad274509aa1eba53d41f15e5226b81419991af64 Mon Sep 17 00:00:00 2001 From: Ricardo Garcia Date: Mon, 4 May 2009 19:31:00 +0200 Subject: [PATCH] Add an "epoch" keyword to the output template --- youtube-dl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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))