From d9c35744f6c67c1fe423a2b317d18af1903fbdb0 Mon Sep 17 00:00:00 2001 From: Bergasha Date: Wed, 19 Aug 2026 13:31:58 +1000 Subject: [PATCH] Only show a server's badge in the footer when it actually has an active session - selecting both Plex and Jellyfin always showed both badges even if only one was streaming. Also gave the footer badges a pill style and added a separator between the stream count and bitrate --- .../widgets/src/media-server/component.tsx | 49 +++++++++++++------ 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/packages/widgets/src/media-server/component.tsx b/packages/widgets/src/media-server/component.tsx index 0e05b6394..86c1e8a0e 100644 --- a/packages/widgets/src/media-server/component.tsx +++ b/packages/widgets/src/media-server/component.tsx @@ -195,12 +195,14 @@ export default function MediaServerWidget({ current?.column === column ? { column, descending: !current.descending } : { column, descending: false }, ); - const uniqueIntegrations = currentStreams.map((stream) => ({ - integrationId: stream.integrationId, - integrationKind: stream.integrationKind, - integrationIcon: getIconUrl(stream.integrationKind), - integrationName: stream.integrationName, - })); + const uniqueIntegrations = currentStreams + .filter((stream) => stream.sessions.length > 0) + .map((stream) => ({ + integrationId: stream.integrationId, + integrationKind: stream.integrationKind, + integrationIcon: getIconUrl(stream.integrationKind), + integrationName: stream.integrationName, + })); const playingCount = flatSessions.filter( (session) => session.currentlyPlaying && session.currentlyPlaying.playback?.state !== "paused", @@ -386,25 +388,42 @@ export default function MediaServerWidget({ borderTop: "1px solid var(--border-color)", }} > - + - + {(t as unknown as (key: string, params?: { count: number }) => string)("footer.streams", { count: flatSessions.length, })} {totalBitrateLabel && (isAdvanced || width >= 300) && ( - - {t("footer.totalBitrate", { bitrate: totalBitrateLabel })} - + <> + + • + + + {t("footer.totalBitrate", { bitrate: totalBitrateLabel })} + + )} - + {uniqueIntegrations.map((integration) => ( - - + + {(isAdvanced || width >= 480) && ( - + {integration.integrationName} )}