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

svtplay: subtitles didn’t get the right filename

This commit is contained in:
Johan Andersson 2014-12-22 10:04:32 +01:00
parent dde85fb7fb
commit 063242b365

View File

@ -54,14 +54,6 @@ class Svtplay(Service, OpenGraphThumbMixin):
else:
options.live = False
if data["video"]["subtitleReferences"]:
try:
suburl = data["video"]["subtitleReferences"][0]["url"]
except KeyError:
pass
if suburl and len(suburl) > 0:
yield subtitle(copy.copy(options), "wrst", suburl)
if options.output_auto:
directory = os.path.dirname(options.output)
options.service = "svtplay"
@ -77,6 +69,14 @@ class Svtplay(Service, OpenGraphThumbMixin):
else:
options.output = title
if data["video"]["subtitleReferences"]:
try:
suburl = data["video"]["subtitleReferences"][0]["url"]
except KeyError:
pass
if suburl and len(suburl) > 0:
yield subtitle(copy.copy(options), "wrst", suburl)
if options.force_subtitle:
return