mirror of
https://codeberg.org/polarisfm/youtube-dl.git
synced 2024-12-27 18:16:44 +00:00
Add an "epoch" keyword to the output template
This commit is contained in:
parent
d09744d055
commit
ad274509aa
1 changed files with 3 additions and 1 deletions
|
@ -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))
|
||||||
|
|
Loading…
Reference in a new issue