pigskin / kodi-gamepass

NFL Game Pass add-on for Kodi
Other
122 stars 83 forks source link

Fixing some minor 2018 Season issues: #381

Closed kaileu closed 6 years ago

kaileu commented 6 years ago
  1. Game Duration returns with comma instead of dot
  2. NFL Network Shows format Type is chromecast instead of ChromeCast like the other Feeds
  3. Game Highlights aren't available for type Chromecast
  4. Teamview is reduced to the CurrentSeason from official Website.
aqw commented 6 years ago

@kaileu Thanks for the PR!

Merging, untested. If this works, then it probably make most sense to just give you push permissions.

---Alex

rva87 commented 6 years ago

Just tested the release, seems the video duration is not always set. My quick fix was setting the duration to 0 if not set, might be more elegant ways to fix.

Request URL: https://www.nflgamepass.com/api/en/content/v1/web/games/2018/pre/1/list

default.py: game_info = '%s [CR] Duration: %s' % (game['phase'], str(timedelta(seconds=int(float(game['video']['videoDuration'].replace(',','.'))))))

sample data: {"homeNickName":"Bengals","homeCityState":"Cincinnati","visitorNickName":"Bears","visitorCityState":"Chicago","gameId":2018080953,"backgroundImage":null,"gameDateTimeUtc":"2018-08-09T23:00:00.000Z","redZone":false,"phase":"FINAL","winner":"Bengals","videoStatus":"ONDEMAND","season":2018,"seasonType":"PRE","week":1,"weekName":"Preseason Week 1","homeTeamId":"0920","homeTeamAbbr":"CIN","homeScore":{"pointTotal":30},"homeTeamResult":"winner","visitorTeamId":"0810","visitorTeamAbbr":"CHI","visitorScore":{"pointTotal":27},"visitorTeamResult":"loser","siteId":3530,"siteCity":"Cincinnati","siteFullName":"Paul Brown Stadium","displayText":{"scheduled":"video-scheduled","live":"video-live","liveIn":"video-live-in","ondemand":"video-ondemand"},"video":{"videoId":"9e93876d-5d29-4728-a50f-e812a3f94c1e","title":"Chicago Bears @ Cincinnati Bengals","description":"","kind":"Game video","videoStatus":"ONDEMAND","videoDuration":"","trimmedVideoDuration":"","slug":"chicago-bears-cincinnati-bengals-3","videoThumbnail":{"templateUrl":"","overridenFormats":{}},"week":"week-1","season":"season-2018","seasonType":"seasontype-pre","scheduleDate":"","isGameOfTheWeek":false,"vocGameTopTag":null,"isBasic":false,"nflprogram":null,"nflprogramcode":null},"condensedVideo":{"videoId":"dfd9a181-11d9-4f13-b0c6-96896949ff56","title":"Chicago Bears @ Cincinnati Bengals - Game in 40'","description":"","kind":"Condensed game","videoStatus":"ONDEMAND","videoDuration":"","trimmedVideoDuration":"","slug":"chicago-bears-cincinnati-bengals-game-in-40","videoThumbnail":{"templateUrl":"","overridenFormats":{}},"week":"week-1","season":"season-2018","seasonType":"seasontype-pre","scheduleDate":"","isGameOfTheWeek":false,"vocGameTopTag":null,"isBasic":false,"nflprogram":null,"nflprogramcode":null},"coachfilmVideo":null,"highlightsVideo":null},