1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 13:44:14 +01:00

dr: dont crash on files without subs

This commit is contained in:
Johan Andersson 2021-10-20 15:00:24 +02:00
parent 1cf16a91a4
commit d8f5e5157b

View File

@ -59,7 +59,8 @@ class Dr(Service, OpenGraphThumbMixin):
yield ServiceError("Can't play this because the video is geoblocked or not available.")
else:
yield from hlsparse(self.config, res, video["url"], output=self.output)
yield subtitle(copy.copy(self.config), "wrst", video["subtitles"][0]["link"], output=self.output)
if len(video["subtitles"]) > 0:
yield subtitle(copy.copy(self.config), "wrst", video["subtitles"][0]["link"], output=self.output)
def find_all_episodes(self, config):
episodes = []