1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-01-27 13:23:11 +08:00

uses spaces in windows filenames

This commit is contained in:
Chronial 2012-10-04 18:50:42 +02:00
parent 92e42657c3
commit 02b05f25cc

View File

@ -203,7 +203,12 @@ def sanitize_filename(s):
s = re.sub(ur' *[:\|] *', u' - ', s)
s = re.sub(ur'[/<>"\?\*]', u'', s)
return u''.join(map(replace_insane, s)).strip('_')
s = u''.join(map(replace_insane, s)).strip('_')
if sys.platform == 'win32':
s = s.replace(u'_', u' ');
return s
def orderedSet(iterable):
""" Remove all duplicates from the input iterable """