tonywagner / plugin.video.mlbserver

watch from Kodi and/or any web browser
GNU General Public License v2.0
15 stars 5 forks source link

get_team_game throws exception when no games #10

Closed jtut1731 closed 3 months ago

jtut1731 commented 3 months ago

Thanks TonyWagner for the project. Long time mlbserver user.

get_team_game throws an exception if there are no current game feeds.

Maybe check if the properties exist on the feed object like this?

if 'mediaId' in feed and 'teamId' in feed and 'language' in feed and 'state' in feed and feed['teamId'] == teamId and feed['language'] == 'en' and (feed['state'] == 'MEDIA_ON' or (date is not None and feed['state'] != 'MEDIA_OFF')):

tonywagner commented 3 months ago

Thanks for the report! This is fixed in https://github.com/tonywagner/plugin.video.mlbserver/commit/aac0157dbea431b526782c1806235f52c85d0008