1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 12:15:40 +01:00

dr: dont crash when there is no subtitles.

This commit is contained in:
Johan Andersson 2015-11-15 18:21:42 +04:00
parent c78960d2b8
commit f606775eb6

View File

@ -46,8 +46,7 @@ class Dr(Service, OpenGraphThumbMixin):
if "Links" not in resource:
yield ServiceError("Cant access this video. its geoblocked.")
return
if "SubtitlesList" in resource:
if "SubtitlesList" in resource and len(resource["SubtitlesList"]) > 0:
suburl = resource["SubtitlesList"][0]["Uri"]
yield subtitle(copy.copy(options), "wrst", suburl)
if "Data" in resource: