shairport-sync: support before/after entering active state, unfixable error detected...
authorDavid Andreoletti <david@andreoletti.net>
Sat, 9 Mar 2024 07:19:59 +0000 (15:19 +0800)
committerRosen Penev <rosenp@gmail.com>
Mon, 22 Apr 2024 12:32:28 +0000 (05:32 -0700)
- Add before/after active state event callbacks in UCI config.
- Add volume change event callbacks in UCI config.
- Add unfixable error event callbacks in UCI config.

As of the current shairport-sync release, all event callbacks have been
mapped to UCI config.

Signed-off-by: David Andreoletti <david@andreoletti.net>
sound/shairport-sync/Makefile
sound/shairport-sync/files/shairport-sync.config
sound/shairport-sync/files/shairport-sync.init

index 48507139274d40e6ca2cfeb8f84b2dc094157035..c176f01039c7110fed8d895ef15a951f4cf31576 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=shairport-sync
 PKG_VERSION:=4.3.2
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/mikebrady/shairport-sync/tar.gz/$(PKG_VERSION)?
index fa1a8dddc4e1e5916a1ffa11f2cf02f2125eada3..bb5423501a6513d393c011c54316eb86db89d4f6 100644 (file)
@@ -37,6 +37,10 @@ config shairport-sync 'shairport_sync'
        # Session Control
        option sesctl_run_before_play_begins '' # /etc/shairport-sync-start.sh
        option sesctl_run_after_play_ends '' # /etc/shairport-sync-stop.sh
+       option sesctl_run_before_entering_active_state '' # /path/to/script.sh
+       option sesctl_run_after_exiting_active_state '' # /path/to/script.sh
+       option sesctl_run_if_an_unfixable_error_is_detected '' # /path/to/script.sh
+       option sesctl_run_when_volume_is_set '' # /path/to/script.sh
        option sesctl_wait_for_completion '' # no/yes
        option sesctl_session_interruption '' # no/yes
        option sesctl_session_timeout '' # 120
index 1f0877535e13ef8b46b2d133a56aaad3128cebbe..f4e7f4464a6f79261376b9bc00e1dd30cb0826e0 100644 (file)
@@ -83,6 +83,10 @@ start_instance() {
                printf "{\n"
                append_str "$cfg" sesctl_run_before_play_begins "run_this_before_play_begins"
                append_str "$cfg" sesctl_run_after_play_ends "run_this_after_play_ends"
+               append_str "$cfg" sesctl_run_before_entering_active_state "run_this_before_entering_active_state"
+               append_str "$cfg" sesctl_run_after_exiting_active_state "run_this_after_exiting_active_state"
+               append_str "$cfg" sesctl_run_if_an_unfixable_error_is_detected "run_this_if_an_unfixable_error_is_detected"
+               append_str "$cfg" sesctl_run_when_volume_is_set "run_this_when_volume_is_set"
                append_str "$cfg" sesctl_wait_for_completion "wait_for_completion"
                append_str "$cfg" sesctl_session_interruption "allow_session_interruption"
                append_num "$cfg" sesctl_session_timeout "session_timeout"