From 3df5ed4e09c647474a6bdac89a94bcfd1b1ea259 Mon Sep 17 00:00:00 2001 From: raiden202 Date: Wed, 8 Jul 2026 11:34:57 -0400 Subject: [PATCH] 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 --- web/src/api/types.ts | 1 + web/src/pages/ItemDetail/components/mediaSpecSections.test.ts | 3 +++ web/src/pages/ItemDetail/components/mediaSpecSections.ts | 1 + 3 files changed, 5 insertions(+) diff --git a/web/src/api/types.ts b/web/src/api/types.ts index 9af64918..65d950a4 100644 --- a/web/src/api/types.ts +++ b/web/src/api/types.ts @@ -982,6 +982,7 @@ export interface VersionAudioTrack { embedded_title?: string; language?: string; codec?: string; + profile?: string; layout?: string; channels?: number; bitrate?: number; diff --git a/web/src/pages/ItemDetail/components/mediaSpecSections.test.ts b/web/src/pages/ItemDetail/components/mediaSpecSections.test.ts index ab63a5d8..24e06bf6 100644 --- a/web/src/pages/ItemDetail/components/mediaSpecSections.test.ts +++ b/web/src/pages/ItemDetail/components/mediaSpecSections.test.ts @@ -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(); }); }); diff --git a/web/src/pages/ItemDetail/components/mediaSpecSections.ts b/web/src/pages/ItemDetail/components/mediaSpecSections.ts index a504223c..4a1745a9 100644 --- a/web/src/pages/ItemDetail/components/mediaSpecSections.ts +++ b/web/src/pages/ItemDetail/components/mediaSpecSections.ts @@ -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));