1
0
Fork 0

Fix %d and empty default in outtmpl

Closes #388
This commit is contained in:
pukkandan 2021-06-09 14:43:51 +05:30
commit 639f1cea92
No known key found for this signature in database
GPG key ID: 0F00D95A001F4698
4 changed files with 11 additions and 2 deletions

View file

@ -936,7 +936,8 @@ class YoutubeDL(object):
# If value is an object, sanitize might convert it to a string
# So we convert it to repr first
value, fmt = repr(value), '%ss' % fmt[:-1]
value = sanitize(key, value)
if fmt[-1] in 'csr':
value = sanitize(key, value)
tmpl_dict[key] = value
return '%({key}){fmt}'.format(key=key, fmt=fmt)