1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-04 04:42:05 -04:00

audio: fix cycle output, improve icon resolution for sink fixes #1808

This commit is contained in:
bbedward
2026-02-23 13:21:04 -05:00
parent f859a14173
commit 2f8f1c30ad
3 changed files with 49 additions and 37 deletions

View File

@@ -22,27 +22,14 @@ DankOSD {
text: root.deviceName
}
function getIconForSink(sink) {
if (!sink)
return "speaker";
const name = sink.name || "";
if (name.includes("bluez"))
return "headset";
if (name.includes("hdmi"))
return "tv";
if (name.includes("usb"))
return "headset";
return "speaker";
}
Connections {
target: AudioService
function onAudioOutputCycled(name) {
function onAudioOutputCycled(name, icon) {
if (!SettingsData.osdAudioOutputEnabled)
return;
root.deviceName = name;
root.deviceIcon = getIconForSink(AudioService.sink);
root.deviceIcon = icon;
root.show();
}
}