From c5d21de6733346ca05f0c1ca55b12c1224ab513c Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Sun, 1 Mar 2015 21:46:22 +0100 Subject: [PATCH] dr: subtitle support this fixes #214 --- lib/svtplay_dl/service/dr.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/svtplay_dl/service/dr.py b/lib/svtplay_dl/service/dr.py index 1cff736..e351ac8 100644 --- a/lib/svtplay_dl/service/dr.py +++ b/lib/svtplay_dl/service/dr.py @@ -10,6 +10,7 @@ from svtplay_dl.utils import get_http_data from svtplay_dl.fetcher.rtmp import RTMP from svtplay_dl.fetcher.hls import HLS, hlsparse from svtplay_dl.fetcher.hds import hdsparse +from svtplay_dl.subtitle import subtitle from svtplay_dl.log import log class Dr(Service, OpenGraphThumbMixin): @@ -47,6 +48,9 @@ class Dr(Service, OpenGraphThumbMixin): return resource = json.loads(resource_data) + if "SubtitlesList" in resource: + suburl = resource["SubtitlesList"][0]["Uri"] + yield subtitle(copy.copy(options), "wrst", suburl) if "Data" in resource: streams = find_stream(options, resource) for i in streams: