Forgot to add '/' and '|' to file name sanitization

This commit is contained in:
Maximilian Wagner
2023-08-05 16:35:33 +02:00
parent 37c1e655e0
commit f75a07dfc0

View File

@@ -497,9 +497,14 @@ def check_file_path(path):
return downloads in os.path.abspath(downloads + path)
# sanitizes file names for windows fs
# replaces the chars with those used by yt-dlp as a substitution
def sanitize_filename(file_name: str):
# '<' and '>' are not allowed on yt
return (file_name
.replace('\\', '')
.replace('/', '')
.replace('|', '')
.replace(':', '')
.replace('*', '')
.replace('?', '')