1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-06-14 15:59:36 +00:00

Expand tilde in template (Fixes #1639)

This commit is contained in:
Philipp Hagemeister 2013-10-22 22:28:19 +02:00
parent f8b45beacc
commit 586a91b67f

View file

@ -292,9 +292,11 @@ class YoutubeDL(object):
u'NA' if v is None else compat_str(v),
restricted=self.params.get('restrictfilenames'),
is_id=(k == u'id'))
template_dict = dict((k, sanitize(k, v)) for k,v in template_dict.items())
template_dict = dict((k, sanitize(k, v))
for k, v in template_dict.items())
filename = self.params['outtmpl'] % template_dict
tmpl = os.path.expanduser(self.params['outtmpl'])
filename = tmpl % template_dict
return filename
except KeyError as err:
self.report_error(u'Erroneous output template')