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:
parent
3dc633df12
commit
0659214816
@ -6,6 +6,7 @@ import re
|
|||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
import copy
|
import copy
|
||||||
|
import platform
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
|
||||||
from svtplay_dl.error import UIException
|
from svtplay_dl.error import UIException
|
||||||
@ -96,6 +97,11 @@ def get_one_media(stream, options):
|
|||||||
# output is a directory
|
# output is a directory
|
||||||
options.output = os.path.join(options.output, filenamify(title_tag))
|
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:
|
try:
|
||||||
stream.get(options)
|
stream.get(options)
|
||||||
except UIException as e:
|
except UIException as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user