mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
parent
ea014f27d2
commit
5a54105ccc
@ -139,10 +139,6 @@ def filename(options, stream):
|
||||
# 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 and options.output.find("\\") > 0:
|
||||
options.output = options.output.replace("\\", "/")
|
||||
return True
|
||||
|
||||
def output(options, extention="mp4", openfd=True):
|
||||
|
@ -78,7 +78,7 @@ class Disney(Service, OpenGraphThumbMixin):
|
||||
title = "%s-%s" % (title, options.service)
|
||||
title = filenamify(title)
|
||||
if len(directory):
|
||||
options.output = "%s/%s" % (directory, title)
|
||||
options.output = os.path.join(directory, title)
|
||||
else:
|
||||
options.output = title
|
||||
|
||||
@ -104,7 +104,7 @@ class Disney(Service, OpenGraphThumbMixin):
|
||||
title = "%s-%s" % (name, options.service)
|
||||
title = filenamify(title)
|
||||
if len(directory):
|
||||
options.output = "%s/%s" % (directory, title)
|
||||
options.output = os.path.join(directory, title)
|
||||
else:
|
||||
options.output = title
|
||||
|
||||
|
@ -70,7 +70,7 @@ class Kanal5(Service):
|
||||
title = "%s-s%s-%s-%s-%s" % (data["program"]["name"], data["seasonNumber"], data["episodeText"], data["id"], options.service)
|
||||
title = filenamify(title)
|
||||
if len(directory):
|
||||
options.output = "%s/%s" % (directory, title)
|
||||
options.output = os.path.join(directory, title)
|
||||
else:
|
||||
options.output = title
|
||||
|
||||
|
@ -32,7 +32,7 @@ class Mtvnn(Service, OpenGraphThumbMixin):
|
||||
if options.output_auto:
|
||||
directory = os.path.dirname(options.output)
|
||||
if len(directory):
|
||||
options.output = "%s/%s" % (directory, title)
|
||||
options.output = os.path.join(directory, title)
|
||||
else:
|
||||
options.output = title
|
||||
|
||||
|
@ -20,7 +20,7 @@ class Raw(Service):
|
||||
extention = False
|
||||
filename = os.path.basename(self.url[:self.url.rfind("/")-1])
|
||||
if options.output and os.path.isdir(options.output):
|
||||
options.output = "%s/%s" % (os.path.dirname(options.output), filename)
|
||||
options.output = os.path.join(os.path.dirname(options.output), filename)
|
||||
extention = True
|
||||
elif options.output is None:
|
||||
options.output = "%s" % filename
|
||||
|
@ -149,7 +149,7 @@ def outputfilename(data, filename, raw):
|
||||
title = "%s.%s-%s-svtplay" % (name, other, data["videoId"])
|
||||
title = filenamify(title)
|
||||
if len(directory):
|
||||
output = "%s/%s" % (directory, title)
|
||||
output = os.path.join(directory, title)
|
||||
else:
|
||||
output = title
|
||||
return output
|
||||
|
@ -92,7 +92,7 @@ class Tv4play(Service, OpenGraphThumbMixin):
|
||||
title = "%s-%s-%s" % (options.output, vid, options.service)
|
||||
title = filenamify(title)
|
||||
if len(directory):
|
||||
options.output = "%s/%s" % (directory, title)
|
||||
options.output = os.path.join(directory, title)
|
||||
else:
|
||||
options.output = title
|
||||
|
||||
|
@ -39,7 +39,7 @@ class Vg(Service, OpenGraphThumbMixin):
|
||||
title = "%s" % jsondata["title"]
|
||||
title = filenamify(title)
|
||||
if len(directory):
|
||||
options.output = "%s/%s" % (directory, title)
|
||||
options.output = os.path.join(directory, title)
|
||||
else:
|
||||
options.output = title
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user