mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-08-22 06:14:05 -07:00
uses spaces in windows filenames
This commit is contained in:
parent
92e42657c3
commit
02b05f25cc
1 changed files with 6 additions and 1 deletions
|
@ -203,7 +203,12 @@ def sanitize_filename(s):
|
||||||
s = re.sub(ur' *[:\|] *', u' - ', s)
|
s = re.sub(ur' *[:\|] *', u' - ', 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):
|
def orderedSet(iterable):
|
||||||
""" Remove all duplicates from the input iterable """
|
""" Remove all duplicates from the input iterable """
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue