Removing Non Ascii for Windows filenames

windows can't save file names with Non Ascii characters
This commit is contained in:
meshr-net 2015-02-21 22:18:54 +03:00
parent 93540ee10e
commit a5b127059b

View File

@ -19,6 +19,7 @@ from ..utils import (
class HlsFD(FileDownloader): class HlsFD(FileDownloader):
def real_download(self, filename, info_dict): def real_download(self, filename, info_dict):
url = info_dict['url'] url = info_dict['url']
filename = ''.join([i if ord(i) < 128 else ' ' for i in filename])
self.report_destination(filename) self.report_destination(filename)
tmpfilename = self.temp_name(filename) tmpfilename = self.temp_name(filename)