feat(sports): A source for every game, a game page with every channel, and Search when none #15
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/sports-sources"
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 2 of the iPhone Sports handoff: a source for every game, the game page (layout C in
design/phase10-sports-sources-mockups.html), and Search when nothing carries a game. Based onmainafter #14.What changed
LiveWire/Sports/ChannelMatcher.swift). LiveWireTV'sChannelMatcher.ktis ported as is: the guide confirms the game (250), a channel named after both teams (200), the exact network (100), the network plus extra words (60 − 3 per word, +5 when the network comes first, +15 for a channel number, −40 for a spin-off word like News or Deportes), and squashed names (10). A network match whose guide shows something else during the game loses 50, and a shared guide id confirms only the network's own channel. Results are deduped by stream, then by name.SportsStore.match). The index is built once per channel list and guide and reused for every game. Score updates only re-match. On tv3: building the index over 24,000 channels takes 0.22–0.26 s, and matching 30–41 games takes 0.8–1.3 s.SportsList.source, ported fromSportsList.kt).search.launchdefault toAppModel.pendingSearch, taken once.LiveWire/Sports/GameDetailSheet.swift). It opens from the ⋯ button after the pill, or from the long-press menu (Watch on …, Other channels, Search for "…"). The page shows a big scoreboard that updates with the 30 s refresh, league and networks, a Watch button for the best source with its reason, and the other channels best first with why each matched. For the pool's channel it also lists Pool sources (pool_sources): Auto, then each provider to pin, as Watch's Sources sheet does. With no channel it shows "No channel found for " and "Search my channels for """.SportsMatchTestcases are ported toChannelMatcherTests, along with its source, options, reason and search-query tests. There are 61 unit tests in all.LiveWireUITestscover three paths: ⋯ opens the page and Watch plays, a row tap plays without opening the page, and a long-press offers Search and fills in the team. They're skipped unless the login is passed asTEST_RUNNER_LW_*environment variables, so no login is in the source.README.md: Sports, the UI tests, and the-sportsDetail/-sportsNoChannelslaunch arguments.Intent: every game ESPN lists gets a way to watch, or a way to look for one. Not a goal: followed teams, pool event descriptions, Watch from start, or the score bar (Phase 3).
Testing
iPhone 18 Pro Simulator, Debug build, tv3, Tuesday 10 November, 8:10–10:30 PM ET:
SPORTS unmatched:log line was empty). Most were Live Now. Illinois @ Texas Tech matched "PEACOCK 05 : ILLINOIS…" earlier in the evening.-sportsNoChannels, because no real game lacked a channel tonight.xcodebuild testwith the tv3 login: 61 unit tests and 3 UI tests pass.For the backend agent: pool_sources looks wrong for Live Sports channels
For stream 1061248727 ("LA Clippers @ Phoenix Suns"),
pool_sourcesreturned 15 sources. Only 2 were the game (NovaTV and GNDK "NBA GAME 03 : PHOENIX SUNS @ LA CLIPPERS"). The rest were unrelated channels: Horror by ALTER, Laff More, Ebony TV, Design Network and Arirang TV. Pinning one of those would play the wrong channel. The page shows what the pool sends, so this needs a server fix, not an app one.Screenshots