1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-30 15:14: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.") yield ServiceError("Can't play this because the video is geoblocked or not available.")
else: else:
yield from hlsparse(self.config, res, video["url"], output=self.output) 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): def find_all_episodes(self, config):
episodes = [] episodes = []