1
0
Fork 0
mirror of https://gitlab.com/dstftw/youtube-dl.git synced 2020-11-16 09:42:26 +00:00

Add an "epoch" keyword to the output template

This commit is contained in:
Ricardo Garcia 2009-05-04 19:31:00 +02:00
parent d09744d055
commit ad274509aa

View file

@ -260,7 +260,9 @@ class FileDownloader(object):
return return
try: 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) self.report_destination(filename)
except (ValueError, KeyError), err: except (ValueError, KeyError), err:
self.trouble('ERROR: invalid output template or system charset: %s' % str(err)) self.trouble('ERROR: invalid output template or system charset: %s' % str(err))