jack: improve node name

Try to use the short nick first and then the name/description
This commit is contained in:
Wim Taymans 2019-08-12 12:28:54 +02:00
parent 48f28f7b63
commit 2d6f9950a5

View file

@ -1469,8 +1469,11 @@ static void registry_event_global(void *data, uint32_t id, uint32_t parent_id,
switch (type) {
case PW_TYPE_INTERFACE_Node:
if ((str = spa_dict_lookup(props, PW_KEY_NODE_NAME)) == NULL)
goto exit;
if ((str = spa_dict_lookup(props, PW_KEY_NODE_NICK)) == NULL &&
(str = spa_dict_lookup(props, PW_KEY_NODE_DESCRIPTION)) == NULL &&
(str = spa_dict_lookup(props, PW_KEY_NODE_NAME)) == NULL) {
str = "node";
}
o = alloc_object(c);
spa_list_append(&c->context.nodes, &o->link);