Predicted lineups, predicted-vs-actual goals, and goals on upcoming cards
- Scheduler now captures FotMob details for fixtures inside 48h, so the projected XIs exist before kickoff; the Lineups tab shows the pitch pre-match under a 'Predicted lineups' header with an honest note (official lineups ~1h before kickoff), switching to the confirmed view at kickoff - Finished matches get their forecast back: the preview falls back to the prediction frozen <=15min before kickoff (the scoreboard's no-hindsight snapshot), with the most-likely-score chip rebuilt from the frozen expected goals; the model card now reads 'Model's pre-match expected goals: 1.60 - 1.02 · final score 2-1', and the market-movement chart returns to finished matches too - Upcoming match cards append the model's expected goals to the hint: 'Model: Brazil 64% · 1.3-0.9 goals' Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -215,13 +215,17 @@ export function startScheduler(
|
||||
logIngest('fotmob', 'map', false, Date.now() - t0, e instanceof Error ? e.message : String(e));
|
||||
}
|
||||
}
|
||||
// details: live fixtures at the live TTL; finished ones until settled
|
||||
// details: live fixtures at the live TTL; finished ones until settled;
|
||||
// upcoming ones inside 48h for the predicted lineups (the 1h cache makes
|
||||
// the extra fetches free on the live cadence).
|
||||
for (const f of state.allFixtures()) {
|
||||
if (stopped) return;
|
||||
const id = getSourceMap(f.num, 'fotmob');
|
||||
if (!id) continue;
|
||||
const live = f.status === 'live';
|
||||
if (!live && f.status !== 'finished') continue;
|
||||
const k = new Date(f.kickoff).getTime();
|
||||
const upcoming = f.status === 'scheduled' && k > now && k - now < 48 * 60 * 60 * 1000;
|
||||
if (!live && f.status !== 'finished' && !upcoming) continue;
|
||||
if (f.status === 'finished') {
|
||||
const row = getMatchProvider<{ v?: number }>(f.num, 'fotmob');
|
||||
const settled = row && row.data.v === 2 && row.updatedAt > new Date(f.kickoff).getTime() + FOTMOB_SETTLE_MS;
|
||||
|
||||
Reference in New Issue
Block a user