1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 13:44:14 +01:00

Fixed issue with series with not active episodes.

This commit is contained in:
Simon Vallebro 2021-02-14 19:12:50 +01:00 committed by Johan Andersson
parent a263a66a49
commit 0bcf162083

View File

@ -210,7 +210,7 @@ class Svtplay(Service, MetadataThumbMixin):
for json_entry in janson["props"]["urqlState"].values():
entry = json.loads(json_entry["data"])
for key, data in entry.items():
if "listablesBy" in key and data[0]["associatedContent"][0]["id"] != "related":
if "listablesBy" in key and (len(data[0]["associatedContent"]) == 0 or data[0]["associatedContent"][0]["id"] != "related"):
associatedContent = data[0]["associatedContent"]
break
if associatedContent: