mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
pw-top: Fallback to app name if no node name/desc exists
This commit is contained in:
parent
5a22d0bfca
commit
7a82be3361
1 changed files with 4 additions and 3 deletions
|
|
@ -361,9 +361,10 @@ static void registry_event_global(void *data, uint32_t id,
|
||||||
struct node *n;
|
struct node *n;
|
||||||
const char *str;
|
const char *str;
|
||||||
|
|
||||||
str = spa_dict_lookup(props, PW_KEY_NODE_NAME);
|
if ((str = spa_dict_lookup(props, PW_KEY_NODE_NAME)) == NULL &&
|
||||||
if (str == NULL)
|
(str = spa_dict_lookup(props, PW_KEY_NODE_DESCRIPTION)) == NULL) {
|
||||||
str = spa_dict_lookup(props, PW_KEY_NODE_DESCRIPTION);
|
str = spa_dict_lookup(props, PW_KEY_APP_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
if ((n = add_node(d, id, str)) == NULL) {
|
if ((n = add_node(d, id, str)) == NULL) {
|
||||||
pw_log_warn("can add node %u: %m", id);
|
pw_log_warn("can add node %u: %m", id);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue