Remove Smart/Fancy Left/Right Quotation Marks from Filename Sanitizer

This commit is contained in:
rlaphoenix 2023-05-20 22:10:55 +01:00
parent 8df04de1ea
commit 301c026ca9
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ def sanitize_filename(filename: str, spacer: str = ".") -> str:
replace("/", " & ").\
replace(";", " & ") # e.g. multi-episode filenames
filename = re.sub(r"[:; ]", spacer, filename) # structural chars to (spacer)
filename = re.sub(r"[\\*!?¿,'\"()<>|$#]", "", filename) # not filename safe chars
filename = re.sub(r"[\\*!?¿,'\"“”()<>|$#]", "", filename) # not filename safe chars
filename = re.sub(rf"[{spacer}]{{2,}}", spacer, filename) # remove extra neighbouring (spacer)s
return filename