1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 21:54:17 +01:00

get_one_media: This will fix #80.

the problem is that c:\test will became c:_tab_est and that is a wrong
filename. because \t is tab.
This commit is contained in:
Johan Andersson 2014-03-24 21:54:03 +01:00
parent 3dc633df12
commit 0659214816

View File

@ -6,6 +6,7 @@ import re
import os
import logging
import copy
import platform
from optparse import OptionParser
from svtplay_dl.error import UIException
@ -96,6 +97,11 @@ def get_one_media(stream, options):
# output is a directory
options.output = os.path.join(options.output, filenamify(title_tag))
if platform.system() == "Windows":
# ugly hack. replace \ with / or add extra \ because c:\test\kalle.flv will add c:_tab_est\kalle.flv
if options.output.find("\\") > 0:
options.output = options.output.replace("\\", "/")
try:
stream.get(options)
except UIException as e: