Skip to content

Commit

Permalink
svtplay: fix a crash on pages with upcoming videos
Browse files Browse the repository at this point in the history
  • Loading branch information
spaam committed Nov 8, 2024
1 parent ace235c commit a69c8c8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/svtplay_dl/service/svtplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ def _get_video(self, janson):
subfix = lang
yield from subtitle_probe(copy.copy(self.config), i["url"], subfix=subfix, output=self.output)

if not janson["videoReferences"]:
yield ServiceError("Media doesn't have any associated videos.")
return
drm = janson["rights"]["drmCopyProtection"]
if not drm and "variants" in janson and "default" in janson["variants"]:
if len(janson["videoReferences"]) == 0:
Expand Down

0 comments on commit a69c8c8

Please sign in to comment.