feat(sports): ESPN scoreboards for 7 leagues, reloaded while the tab is open #14
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/sports-espn"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase 1 of the iPhone Sports handoff: the TV app's ESPN scoreboard, in layout A of the mockups. Finding a channel for every game, the Other channels sheet and Search hand-off are Phase 2.
What changed
LiveWire/Sports/EspnClient.swift). The TV app's 7 leagues load at once, and a league that fails is skipped. The error state shows only when every league fails and nothing has loaded yet. Dates are accepted with or without seconds (2026-09-29T00:15Z). Logos come from ESPN's image resizer at 60 px, about 4 KB each instead of 98 KB.LiveWire/Sports/SportsList.swift), ported fromSportsList.kt,SportsFormat.ktandSportsRepository.kt:LiveWire/Sports/SportsView.swift) follow mockup A. Each row has the league, the status (red with a dot while live), a line per team (logo, code, name, score, leader in bold) and the networks. A game with a pool channel gets a Live Now pill, and tapping it plays the channel and switches to Watch, as before. Other games aren't tappable until Phase 2 adds sources.LiveWire/Sports/SportsStore.swift,AppModel.refreshLiveNow). Scores and the Live Sports category (get_live_streams&category_id=) reload when the tab opens, when the app comes back to the foreground, and every 30 s while a game is live or should have started. Pull to refresh works too. Opening the tab again within 10 s doesn't reload.LiveWireTeststarget inproject.yml(the project was regenerated with XcodeGen 2.46.0, and a sharedLiveWirescheme is now committed). The TV app's Sports, format and ESPN-date tests are ported, plus tests for the iPhone's pool rows and the scoreboard mapping. 30 tests.README.md: the Sports line,LiveWire/Sports/, how to run the tests, and the-sportsLeague/-sportsFaillaunch arguments.Intent: bring the iPhone Sports tab up to the TV app's scoreboard. Not a goal here: channel matching for games the pool doesn't carry, the Other channels sheet, followed teams, or the score bar (Phases 2 and 3).
Testing
iPhone 18 Pro Simulator, Debug build, tv3, Tuesday 10 November 7:45–8:00 PM ET:
SPORTSreload lines showed Bucks–Knicks going 10-13 → 13-13 at 6:00 → 5:47 → 5:01 in the 1st, about every 30 s.xcodebuild testpasses 30 of 30.Finding: ESPN's default college boards are small
ESPN's default college scoreboards only list featured games. Tonight, NCAAB listed 8 games where
groups=50(all of Division I) has 69, 38 of them live. NCAAF listed 20 of Saturday's games and left out tonight's two live MAC games, whichgroups=80includes. The TV app makes the same call, so this PR matches it. Those games still show under More from the pool when the pool carries them. Addinggroupsis a one-line change per league, if you want it in both apps.Screenshots
The last one also shows More from the pool and its Show all button.