From ad80faaa8da75fd562cac4eb776312b83160c9d9 Mon Sep 17 00:00:00 2001 From: Julian Bouzas Date: Fri, 14 Jan 2022 07:24:52 -0500 Subject: [PATCH] default-nodes: increase priority if node has available routes Fixes #163 --- modules/module-default-nodes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/module-default-nodes.c b/modules/module-default-nodes.c index ac9a87bd..32b2725b 100644 --- a/modules/module-default-nodes.c +++ b/modules/module-default-nodes.c @@ -206,11 +206,11 @@ find_best_media_class_node (WpDefaultNodes * self, const gchar *media_class, WP_PIPEWIRE_OBJECT (node), PW_KEY_PRIORITY_SESSION); gint prio = prio_str ? atoi (prio_str) : -1; - if (!node_has_available_routes (self, node)) - continue; + if (node_has_available_routes (self, node)) + prio += 10000; if (name && node_name && g_strcmp0 (name, node_name) == 0) - prio += 10000; + prio += 20000; if (prio > highest_prio || res == NULL) { highest_prio = prio; -- GitLab