diff --git a/client/player.c b/client/player.c
index a8d05cf..4f8293c 100644
--- a/client/player.c
+++ b/client/player.c
static GList *transports = NULL;
static struct queue *ios = NULL;
static uint8_t bcast_code[] = BCAST_CODE;
+static bool auto_acquire = false;
struct transport {
GDBusProxy *proxy;
dbus_message_iter_get_basic(iter, &str);
- if (strcmp(str, "pending"))
- return;
-
- transport_acquire(proxy, true);
+ if (!strcmp(str, "pending") || !strcmp(str, "broadcasting"))
+ transport_acquire(proxy, !auto_acquire);
}
static void property_changed(GDBusProxy *proxy, const char *name,
GDBusProxy *proxy;
int i;
+ if (argc == 2 && !strcmp(argv[1], "auto")) {
+ auto_acquire = true;
+ return bt_shell_noninteractive_quit(EXIT_SUCCESS);
+ }
+
for (i = 1; i < argc; i++) {
proxy = g_dbus_proxy_lookup(transports, NULL, argv[i],
BLUEZ_MEDIA_TRANSPORT_INTERFACE);