From bdc24c5a2e092c00a02c0e9dcae0cff2e4f9871c Mon Sep 17 00:00:00 2001 From: vicrodh Date: Sun, 8 Mar 2026 13:04:51 -0600 Subject: [PATCH] fix: show configured device name when player has no active stream Fall back to settings.output_device when the player hasn't reported a device yet (before first playback). Previously showed "No device" even though a device was configured in audio settings. Also change the final fallback from "No device" to "System Default" since no configured device means the system default is being used. --- src/lib/components/AudioOutputBadges.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/components/AudioOutputBadges.svelte b/src/lib/components/AudioOutputBadges.svelte index 6e69cfa27..142a11127 100644 --- a/src/lib/components/AudioOutputBadges.svelte +++ b/src/lib/components/AudioOutputBadges.svelte @@ -68,8 +68,8 @@ const tickerSpeed = 40; // pixels per second const deviceNameDuration = $derived(deviceNameOverflow > 0 ? `${(deviceNameOverflow + 16) / tickerSpeed}s` : '0s'); - // Derived state - const currentDevice = $derived(outputStatus?.device_name ?? null); + // Derived state: active stream device, or configured device from settings as fallback + const currentDevice = $derived(outputStatus?.device_name ?? settings?.output_device ?? null); // Get PipeWire description for current device const pipewireDescription = $derived.by(() => { @@ -94,7 +94,7 @@ // Use PipeWire/ALSA description if available, otherwise fall back to heuristic const prettyDeviceName = $derived( - pipewireDescription ?? alsaDescription ?? (currentDevice ? getDevicePrettyName(currentDevice) : 'No device') + pipewireDescription ?? alsaDescription ?? (currentDevice ? getDevicePrettyName(currentDevice) : 'System Default') ); const isExternal = $derived(currentDevice ? isExternalDevice(currentDevice) : false);