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

service: no need to check video streams when we force subtitles

This commit is contained in:
Johan Andersson 2014-09-21 19:12:17 +02:00
parent f249c3c406
commit 782ad2854e
3 changed files with 10 additions and 0 deletions

View File

@ -74,6 +74,9 @@ class Kanal5(Service):
else: else:
options.output = title options.output = title
if options.force_subtitle:
return
for i in data["streams"]: for i in data["streams"]:
if i["drmProtected"]: if i["drmProtected"]:
log.error("We cant download drm files for this site.") log.error("We cant download drm files for this site.")

View File

@ -24,6 +24,10 @@ class Nrk(Service, OpenGraphThumbMixin):
parse = urlparse(self.url) parse = urlparse(self.url)
subtitle = "%s://%s%s" % (parse.scheme, parse.netloc, match.group(1)) subtitle = "%s://%s%s" % (parse.scheme, parse.netloc, match.group(1))
yield subtitle_tt(subtitle) yield subtitle_tt(subtitle)
if options.force_subtitle:
return
match = re.search(r'data-media="(.*manifest.f4m)"', data) match = re.search(r'data-media="(.*manifest.f4m)"', data)
if match: if match:
manifest_url = match.group(1) manifest_url = match.group(1)

View File

@ -71,6 +71,9 @@ class Svtplay(Service, OpenGraphThumbMixin):
else: else:
options.output = title options.output = title
if options.force_subtitle:
return
for i in data["video"]["videoReferences"]: for i in data["video"]["videoReferences"]:
parse = urlparse(i["url"]) parse = urlparse(i["url"])