diff --git a/web/src/releases.ts b/web/src/releases.ts index edfdf87..961c631 100644 --- a/web/src/releases.ts +++ b/web/src/releases.ts @@ -357,6 +357,8 @@ export function bucketOf(release: MovieRelease): Bucket { * The probed attributes a file row shows as chips (§5.6, §7.4) — ffprobe * truth, not name claims. Shared by movie and episode file rows; the probe * JSON arrives untyped from the API, so the shape is narrowed here. + * + * Audio is reported as the set of languages present, one chip each. */ export function probedAttributeTags(probed: unknown): string[] { if (probed === null || typeof probed !== "object") { @@ -378,11 +380,15 @@ export function probedAttributeTags(probed: unknown): string[] { if (probe.hdr && probe.hdr !== "SDR") { tags.push(probe.hdr); } + // Set, not push: commentary tracks repeat the feature audio's language, + // and no test catches a row that renders `en` three times. + const languages = new Set(); for (const track of probe.audio_tracks ?? []) { if (track.language) { - tags.push(track.language); + languages.add(track.language); } } + tags.push(...languages); return tags; }