1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-26 21:25:39 +01:00

svtplay: fix a small corner case with some videos.

for some reason some sign videos had no default key in variants
This commit is contained in:
Johan Andersson 2024-10-25 21:41:04 +02:00
parent 583a2edf4d
commit ce5859346c

View File

@ -116,11 +116,11 @@ class Svtplay(Service, MetadataThumbMixin):
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"])