diff --git a/lib/svtplay_dl/__init__.py b/lib/svtplay_dl/__init__.py index 9ead3f6..7a69eaa 100644 --- a/lib/svtplay_dl/__init__.py +++ b/lib/svtplay_dl/__init__.py @@ -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: