fix(audio): heat call in the announcer's language with spoken names only (1.55.1)
This commit is contained in:
1 parent
3425da4b8f
commit
c3aafba327
5 files changed
+23
-6
No files matched your search
+12
-1
@@ -446,12 +446,23 @@ function callHeat(sessionId) {
|
||||
variables: {
|
||||
heat: `${getDayClassLabel(session)} ${session.name}`.trim(),
|
||||
minutes: Math.max(1, Math.round(((row?.start || Date.now()) - Date.now()) / 60000)),
|
||||
drivers: getSessionGridEntries(session).map((entry) => entry.name).join(", "),
|
||||
drivers: buildHeatCallDrivers(session),
|
||||
},
|
||||
logData: { raceId: session.eventId, sessionId: session.id },
|
||||
});
|
||||
renderView();
|
||||
}
|
||||
// "Drivers: Roy, Eddie. " in the announcer's language (not the page's), with each driver's
|
||||
// spoken name; drivers that can't be found are left out rather than read as "unknown driver".
|
||||
function buildHeatCallDrivers(session) {
|
||||
const names = getSessionGridOrder(session)
|
||||
.map((driverId) => state.drivers.find((item) => item.id === driverId))
|
||||
.filter(Boolean)
|
||||
.map((driver) => String(driver.speechName || driver.name || "").trim())
|
||||
.filter(Boolean);
|
||||
if (!names.length) return "";
|
||||
return `${state.settings.raceAudio?.language === "en" ? "Drivers" : "Förare"}: ${names.join(", ")}. `;
|
||||
}
|
||||
function getDueCallFor(date) {
|
||||
return getDueCall(buildDayRows(date), { day: getDayPlan(date), snoozedUntil: (id) => callSnoozes.get(id) || 0 });
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user