diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-06-09 14:43:51 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-06-09 15:37:15 +0530 |
commit | 639f1cea9285d79c0eef4d2ec332b505c37ef34e (patch) | |
tree | 4da962a89dc99c58f5d6755cc0ea1583d908473a /yt_dlp/YoutubeDL.py | |
parent | b5c5d84f60addd49a010a1f485d28f1b41676631 (diff) |
Fix `%d` and empty default in outtmpl
Closes #388
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r-- | yt_dlp/YoutubeDL.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index ad96cebcd..72fc9ad52 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -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) |