diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-12-23 09:03:46 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-12-23 09:15:05 +0530 |
commit | 37893bb0c9afdeead29e3707d2dfb67596f03897 (patch) | |
tree | a3c53f868c3f23c33b55418c40b34fd41141553d /yt_dlp/YoutubeDL.py | |
parent | c25de59cf7ca690ba452f98a1438c38ec24a44e3 (diff) | |
download | hypervideo-pre-37893bb0c9afdeead29e3707d2dfb67596f03897.tar.lz hypervideo-pre-37893bb0c9afdeead29e3707d2dfb67596f03897.tar.xz hypervideo-pre-37893bb0c9afdeead29e3707d2dfb67596f03897.zip |
[outtmpl] Change filename sanitization type to `S`
`F` is already used for float!
Bug in e0fd95737d1a3c4a2bfb470c5408a396c8545ca5
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r-- | yt_dlp/YoutubeDL.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 3bbde9b00..6fcd52b99 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -1006,7 +1006,7 @@ class YoutubeDL(object): def validate_outtmpl(cls, outtmpl): ''' @return None or Exception object ''' outtmpl = re.sub( - STR_FORMAT_RE_TMPL.format('[^)]*', '[ljqBUDF]'), + STR_FORMAT_RE_TMPL.format('[^)]*', '[ljqBUDS]'), lambda mobj: f'{mobj.group(0)[:-1]}s', cls._outtmpl_expandpath(outtmpl)) try: @@ -1048,7 +1048,7 @@ class YoutubeDL(object): } TMPL_DICT = {} - EXTERNAL_FORMAT_RE = re.compile(STR_FORMAT_RE_TMPL.format('[^)]*', f'[{STR_FORMAT_TYPES}ljqBUDF]')) + EXTERNAL_FORMAT_RE = re.compile(STR_FORMAT_RE_TMPL.format('[^)]*', f'[{STR_FORMAT_TYPES}ljqBUDS]')) MATH_FUNCTIONS = { '+': float.__add__, '-': float.__sub__, @@ -1167,7 +1167,7 @@ class YoutubeDL(object): value), str_fmt elif fmt[-1] == 'D': # decimal suffix value, fmt = format_decimal_suffix(value, f'%{fmt[:-1]}f%s' if fmt[:-1] else '%d%s'), 's' - elif fmt[-1] == 'F': # filename sanitization + elif fmt[-1] == 'S': # filename sanitization value, fmt = filename_sanitizer(initial_field, value, restricted='#' in flags), str_fmt elif fmt[-1] == 'c': if value: |