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

dr: subtitle support

this fixes #214
This commit is contained in:
Johan Andersson 2015-03-01 21:46:22 +01:00
parent ec7356aeea
commit c5d21de673

View File

@ -10,6 +10,7 @@ from svtplay_dl.utils import get_http_data
from svtplay_dl.fetcher.rtmp import RTMP from svtplay_dl.fetcher.rtmp import RTMP
from svtplay_dl.fetcher.hls import HLS, hlsparse from svtplay_dl.fetcher.hls import HLS, hlsparse
from svtplay_dl.fetcher.hds import hdsparse from svtplay_dl.fetcher.hds import hdsparse
from svtplay_dl.subtitle import subtitle
from svtplay_dl.log import log from svtplay_dl.log import log
class Dr(Service, OpenGraphThumbMixin): class Dr(Service, OpenGraphThumbMixin):
@ -47,6 +48,9 @@ class Dr(Service, OpenGraphThumbMixin):
return return
resource = json.loads(resource_data) 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: if "Data" in resource:
streams = find_stream(options, resource) streams = find_stream(options, resource)
for i in streams: for i in streams: