Fix filename sanitization with `--no-windows-filenames` (#11988)

Fix bug in 6fc85f617a

Closes #11987
Authored by: bashonly
master
bashonly 13 hours ago committed by GitHub
parent 1f4e1e85a2
commit 8346b54915
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1323,7 +1323,7 @@ class YoutubeDL:
elif (sys.platform != 'win32' and not self.params.get('restrictfilenames')
and self.params.get('windowsfilenames') is False):
def sanitize(key, value):
return value.replace('/', '\u29F8').replace('\0', '')
return str(value).replace('/', '\u29F8').replace('\0', '')
else:
def sanitize(key, value):
return filename_sanitizer(key, value, restricted=self.params.get('restrictfilenames'))

Loading…
Cancel
Save