From 459fa7625cbc1c00c13d06e4414c88d4942db9be Mon Sep 17 00:00:00 2001 From: David Andreoletti Date: Sat, 9 Mar 2024 15:19:59 +0800 Subject: [PATCH] shairport-sync: support before/after entering active state, unfixable error detected, volume set events in UCI config - 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 --- sound/shairport-sync/Makefile | 2 +- sound/shairport-sync/files/shairport-sync.config | 4 ++++ sound/shairport-sync/files/shairport-sync.init | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/sound/shairport-sync/Makefile b/sound/shairport-sync/Makefile index 4850713927..c176f01039 100644 --- a/sound/shairport-sync/Makefile +++ b/sound/shairport-sync/Makefile @@ -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)? diff --git a/sound/shairport-sync/files/shairport-sync.config b/sound/shairport-sync/files/shairport-sync.config index fa1a8dddc4..bb5423501a 100644 --- a/sound/shairport-sync/files/shairport-sync.config +++ b/sound/shairport-sync/files/shairport-sync.config @@ -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 diff --git a/sound/shairport-sync/files/shairport-sync.init b/sound/shairport-sync/files/shairport-sync.init index 1f0877535e..f4e7f4464a 100644 --- a/sound/shairport-sync/files/shairport-sync.init +++ b/sound/shairport-sync/files/shairport-sync.init @@ -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" -- 2.30.2