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/utils.py | |
parent | b5c5d84f60addd49a010a1f485d28f1b41676631 (diff) | |
download | hypervideo-pre-639f1cea9285d79c0eef4d2ec332b505c37ef34e.tar.lz hypervideo-pre-639f1cea9285d79c0eef4d2ec332b505c37ef34e.tar.xz hypervideo-pre-639f1cea9285d79c0eef4d2ec332b505c37ef34e.zip |
Fix `%d` and empty default in outtmpl
Closes #388
Diffstat (limited to 'yt_dlp/utils.py')
-rw-r--r-- | yt_dlp/utils.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py index 6737c1965..96f41ddd4 100644 --- a/yt_dlp/utils.py +++ b/yt_dlp/utils.py @@ -2107,6 +2107,8 @@ def sanitize_filename(s, restricted=False, is_id=False): return '_' return char + if s == '': + return '' # Handle timestamps s = re.sub(r'[0-9]+(?::[0-9]+)+', lambda m: m.group(0).replace(':', '_'), s) result = ''.join(map(replace_insane, s)) |