fix(audio): heat call in the announcer's language with spoken names only (1.55.1)

This commit is contained in:
larssand committed 2026-11-03 09:11:32 +01:00
1 parent 3425da4b8f
commit c3aafba327
5 files changed
+23 -6

No files matched your search

+6
View File
@@ -8,6 +8,12 @@ The application version is maintained in `package.json` and displayed in the adm
No changes recorded yet.
## 1.55.1 - 2026-11-03
### Fixed
- Calling a heat could mix languages: a driver missing from the start list was read as "Okänd förare" in the page's language inside an English call. The call now names only drivers it finds (by their spoken name if set), says "Drivers"/"Förare" in the announcer's language, and leaves the list out when there is none.
## 1.55.0 - 2026-11-03
### Changed
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "rc-racecore",
"version": "1.55.0",
"version": "1.55.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "rc-racecore",
"version": "1.55.0",
"version": "1.55.1",
"hasInstallScript": true,
"dependencies": {
"better-sqlite3": "^12.11.1",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "rc-racecore",
"version": "1.55.0",
"version": "1.55.1",
"private": true,
"description": "RC RaceCore live timing and race control with AMMC ingest and SQLite persistence",
"engines": {
+2 -2
View File
@@ -47,7 +47,7 @@
"race_1_minute": "Race starts in one minute.", "race_30_seconds": "Thirty seconds to start.", "race_10_seconds": "Ten seconds to start.",
"drivers_ready": "Drivers, stand by.", "start_sequence": "Starting on the sound of the tone.", "false_start": "False start.", "restart_race": "Prepare to restart the race.",
"staggered_release": "Car {tp}.",
"heat_call": "{heat} starts in {minutes} minutes. Drivers: {drivers}. Get ready.",
"heat_call": "{heat} starts in {minutes} minutes. {drivers}Get ready.",
"prologue_start": "{heat} starts in {time}. The track is open.",
"prologue_minutes": "{minutes} minutes to the start.",
"prologue_grid": "Thirty seconds to start. Cars to the grid.",
@@ -78,7 +78,7 @@
"race_1_minute": "Start om en minut.", "race_30_seconds": "Trettio sekunder till start.", "race_10_seconds": "Tio sekunder till start.",
"drivers_ready": "Förare, gör er redo.", "start_sequence": "Start på signalen.", "false_start": "Felaktig start.", "restart_race": "Förbered omstart.",
"staggered_release": "Bil {tp}.",
"heat_call": "{heat} startar om {minutes} minuter. Förare: {drivers}. Gör er redo.",
"heat_call": "{heat} startar om {minutes} minuter. {drivers}Gör er redo.",
"prologue_start": "{heat} startar om {time}. Banan är öppen.",
"prologue_minutes": "{minutes} minuter till start.",
"prologue_grid": "Trettio sekunder till start. Bilarna till startplatsen.",
+12 -1
View File
@@ -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 });
}