Skip to content

Commit f787c83

Browse files
committed
feat(sound): show profile description in sink/source names
1 parent 8688b54 commit f787c83

File tree

1 file changed

+9
-5
lines changed
  • subscriptions/sound/src/pipewire

1 file changed

+9
-5
lines changed

subscriptions/sound/src/pipewire/node.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,15 @@ impl Node {
9090
object_id: object_id?,
9191
device_id,
9292
media_class: media_class?,
93-
description: node_description
94-
.strip_suffix(profile_description)
95-
.unwrap_or(node_description)
96-
.trim_ascii_end()
97-
.to_owned(),
93+
description: if profile_description.is_empty() {
94+
node_description.to_owned()
95+
} else {
96+
let device_name = node_description
97+
.strip_suffix(profile_description)
98+
.unwrap_or(node_description)
99+
.trim_ascii_end();
100+
[profile_description, " - ", device_name].concat()
101+
},
98102
icon_name,
99103
audio_channels,
100104
audio_position,

0 commit comments

Comments
 (0)