1
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp synced 2025-01-18 06:43:06 +01:00

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

Fix bug in 6fc85f617a

Closes #11987
Authored by: bashonly
This commit is contained in:
bashonly 2025-01-11 13:05:23 -06:00 committed by GitHub
parent 1f4e1e85a2
commit 8346b54915
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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'))