1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 21:54:17 +01:00

svtplay: fix a crash downloading clip

fixes: #1363
This commit is contained in:
Johan Andersson 2021-04-19 22:33:33 +02:00
parent bb9c419469
commit ce95a23dd8

View File

@ -261,7 +261,7 @@ class Svtplay(Service, MetadataThumbMixin):
vid = data["video"]["svtId"]
for seasons in data["associatedContent"]:
for i in seasons["items"]:
if i["item"]["videoSvtId"] == vid:
if i["item"]["videoSvtId"] == vid and "positionInSeason" in i["item"]:
match = re.search(r"S.song (\d+)", i["item"]["positionInSeason"])
if match:
return match.group(1)