Add server status -- i.e. can we still send commands to the DACP server. Hook it up as "Server" property in basic remote control.

This commit is contained in:
Mike Brady
2018-03-19 16:53:58 +00:00
parent fba40733f3
commit c02e53ea80
7 changed files with 42 additions and 7 deletions
+6
View File
@@ -20,8 +20,14 @@ ShairportSyncBasicRemoteControl *shairportSyncBasicRemoteControlSkeleton;
void dbus_basic_remote_control_metadata_watcher(struct metadata_bundle *argc, __attribute__((unused)) void *userdata) {
// debug(1, "DBUS basic remote control watcher called");
shairport_sync_basic_remote_control_set_airplay_volume(shairportSyncBasicRemoteControlSkeleton, argc->airplay_volume);
if (argc->dacp_server_active)
shairport_sync_basic_remote_control_set_server(shairportSyncBasicRemoteControlSkeleton, argc->client_ip);
else
shairport_sync_basic_remote_control_set_server(shairportSyncBasicRemoteControlSkeleton, "");
GVariantBuilder *dict_builder, *aa;
/* Build the metadata array */