nomego / Lazyman.bundle

Lazyman Plex Channel
105 stars 24 forks source link

Plugin errors out when game has no broadcast #60

Closed csmith1210 closed 5 years ago

csmith1210 commented 5 years ago

So this edge case popped up today I guess where the Mets vs Nats game was listed in the API but it has no actual radio or TV broadcast thus giving this wonderful error:

File "/config/Library/Application Support/Plex Media Server/Plug-ins/Lazyman.bundle/Contents/Code/game.py", line 62, in fromContent
    for stream in content["media"]["epg"] if stream["title"] in ["MLBTV", "NHLTV"]
KeyError: 'epg'

See API result here,tickets)&language=en) (it's game 1).