Skip to content

Commit

Permalink
svtplay: fix a small corner case with some videos.
Browse files Browse the repository at this point in the history
for some reason some sign videos had no default key in variants
  • Loading branch information
spaam committed Oct 25, 2024
1 parent 583a2ed commit ce58593
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/svtplay_dl/service/svtplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ def _get_video(self, janson):

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

for videorfc in janson["variants"]["default"]["videoReferences"]:
for videorfc in janson["videoReferences"]:
params = {}
special = False
params["manifestUrl"] = quote_plus(videorfc["url"])
Expand Down

0 comments on commit ce58593

Please sign in to comment.