]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Updated activity_monitor.c - metadata publishing wrong codes 1023/head
authorminix1234 <48591487+minix1234@users.noreply.github.com>
Fri, 12 Jun 2020 13:03:30 +0000 (09:03 -0400)
committerGitHub <noreply@github.com>
Fri, 12 Jun 2020 13:03:30 +0000 (09:03 -0400)
Found that MQTT activity_start: abeg and activity_end: aend topics where never being published. instead immediately after a play session started a play_end: pend topic was sent.  Also after the activity_timout a duplicate play_end was received.

This commit fixes those bugs.

activity_monitor.c

index ce7edc5f537ba7419b72155496ae0359d83b90b4..735fd03ad97f6c034ae19911615a1887be564ee8 100644 (file)
@@ -62,7 +62,7 @@ void going_active(int block) {
     command_execute(config.cmd_active_start, "", block);
 #ifdef CONFIG_METADATA
   debug(2, "abeg");                       // active mode begin
-  send_ssnc_metadata('pend', NULL, 0, 1); // contains cancellation points
+  send_ssnc_metadata('abeg', NULL, 0, 1); // contains cancellation points
 #endif
 
 #ifdef CONFIG_DBUS_INTERFACE
@@ -89,7 +89,7 @@ void going_inactive(int block) {
     command_execute(config.cmd_active_stop, "", block);
 #ifdef CONFIG_METADATA
   debug(2, "aend");                       // active mode end
-  send_ssnc_metadata('pend', NULL, 0, 1); // contains cancellation points
+  send_ssnc_metadata('aend', NULL, 0, 1); // contains cancellation points
 #endif
 
 #ifdef CONFIG_DBUS_INTERFACE