1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 04:05:39 +01:00

Fix find all episodes for tv4play, some dictionary keys sometimes missing.

This commit is contained in:
Harald Gustafsson 2018-08-18 14:13:29 +02:00 committed by Johan Andersson
parent dd76a21fbe
commit 7736af04b5

View File

@ -94,11 +94,11 @@ class Tv4play(Service, OpenGraphThumbMixin):
if "program" in janson2["data"]:
if "panels" in janson2["data"]["program"]:
for n in janson2["data"]["program"]["panels"]:
if n["assetType"] == "EPISODE":
if n.get("assetType", None) == "EPISODE":
for z in n["videoList"]["videoAssets"]:
show = z["program_nid"]
items.append(z["id"])
if n["assetType"] == "CLIP" and config.get("include_clips"):
if n.get("assetType", None) == "CLIP" and config.get("include_clips"):
for z in n["videoList"]["videoAssets"]:
show = z["program_nid"]
items.append(z["id"])