mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 04:05:39 +01:00
viafree: check if we have any subtitles
fixes a crash where we expected to see subs but the list is empty
This commit is contained in:
parent
ef557cb9fb
commit
bf1f9c545a
@ -75,7 +75,7 @@ class Viaplay(Service, OpenGraphThumbMixin):
|
|||||||
)
|
)
|
||||||
for n in list(streams.keys()):
|
for n in list(streams.keys()):
|
||||||
yield streams[n]
|
yield streams[n]
|
||||||
if "subtitles" in janson["embedded"]:
|
if "subtitles" in janson["embedded"] and len(janson["embedded"]["subtitles"]) > 0:
|
||||||
yield subtitle(copy.copy(self.config), "wrst", janson["embedded"]["subtitles"][0]["link"]["href"], output=self.output)
|
yield subtitle(copy.copy(self.config), "wrst", janson["embedded"]["subtitles"][0]["link"]["href"], output=self.output)
|
||||||
|
|
||||||
def find_all_episodes(self, config):
|
def find_all_episodes(self, config):
|
||||||
|
Loading…
Reference in New Issue
Block a user