1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-30 22:25:19 +00:00

[outtmpl] Alternate form of format type l for \n delimited list

This commit is contained in:
pukkandan
2021-09-27 11:29:16 +05:30
parent d31dab7084
commit 91dd88b90f
4 changed files with 7 additions and 3 deletions

View File

@@ -2099,7 +2099,9 @@ def sanitize_filename(s, restricted=False, is_id=False):
def replace_insane(char):
if restricted and char in ACCENT_CHARS:
return ACCENT_CHARS[char]
if char == '?' or ord(char) < 32 or ord(char) == 127:
elif not restricted and char == '\n':
return ' '
elif char == '?' or ord(char) < 32 or ord(char) == 127:
return ''
elif char == '"':
return '' if restricted else '\''