1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 04:05:39 +01:00

get_one_media: don’t try to decode utf8 on filenames on windows

more fixes #233
This commit is contained in:
Johan Andersson 2015-04-30 10:51:43 +02:00
parent 67ad23a8b3
commit 07038caa2a

View File

@ -180,7 +180,10 @@ def get_media(url, options):
def get_one_media(stream, options):
if options.output:
if is_py2:
options.output = options.output.decode("utf-8")
if platform.system() == "Windows":
options.output = options.output.decode("lain1")
else:
options.output = options.output.decode("utf-8")
options.output = options.output.replace('"', '').replace("'", "").rstrip('\\')
if not options.output or os.path.isdir(options.output):
error, data = stream.get_urldata()