feat(web): show audio stream profile in Media Info (#339)

Expose the optional audio stream profile field in the web API type and include it in the Media Info audio section when present. This mirrors the existing video profile row and is additive for servers that do not emit audio profiles yet.

Co-authored-by: Silo Contributor <silo-contributor@example.invalid>
This commit is contained in:
raiden202
2026-07-08 11:34:57 -04:00
committed by GitHub
co-authored by Silo Contributor
parent 0deff23985
commit 3df5ed4e09
3 changed files with 5 additions and 0 deletions
+1
View File
@@ -982,6 +982,7 @@ export interface VersionAudioTrack {
embedded_title?: string;
language?: string;
codec?: string;
profile?: string;
layout?: string;
channels?: number;
bitrate?: number;
@@ -302,6 +302,7 @@ describe("buildAudioSections", () => {
embedded_title: "TrueHD Atmos 7.1",
language: "eng",
codec: "truehd",
profile: "Dolby TrueHD + Dolby Atmos",
layout: "7.1",
channels: 8,
bitrate: 4_500,
@@ -320,12 +321,14 @@ describe("buildAudioSections", () => {
expect(rowValue(first.rows, "Title")).toBe("TrueHD Atmos 7.1");
expect(rowValue(first.rows, "Language")).toBe("English");
expect(rowValue(first.rows, "Codec")).toBe("TrueHD");
expect(rowValue(first.rows, "Profile")).toBe("Dolby TrueHD + Dolby Atmos");
expect(rowValue(first.rows, "Layout")).toBe("7.1");
expect(rowValue(first.rows, "Channels")).toBe("7.1");
expect(rowValue(first.rows, "Sample Rate")).toBe("48,000 Hz");
expect(rowValue(first.rows, "Bit Depth")).toBe("24-bit");
expect(rowValue(first.rows, "Default")).toBe("Yes");
expect(rowValue(sectionAt(sections, 1).rows, "Default")).toBeNull();
expect(rowValue(sectionAt(sections, 1).rows, "Profile")).toBeNull();
});
});
@@ -197,6 +197,7 @@ export function buildAudioSections(version: FileVersion): MediaSpecSection[] {
pushRow(rows, "Title", trackTitle(track));
pushRow(rows, "Language", formatLanguageName(track.language));
pushRow(rows, "Codec", track.codec ? mapAudioLabel(track.codec) : "");
pushRow(rows, "Profile", track.profile);
pushRow(rows, "Layout", track.layout);
pushRow(rows, "Channels", formatChannels(track.channels));
pushRow(rows, "Bitrate", formatBitrate(track.bitrate));