From 4e122303a1958e11f4808e7a3d5774fad9976876 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Sun, 10 Jan 2021 16:42:08 +0100 Subject: [PATCH] [conf] Add speaker level option to disable AirPlay 1 --- forked-daapd.conf.in | 3 +++ src/conffile.c | 1 + src/outputs/raop.c | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/forked-daapd.conf.in b/forked-daapd.conf.in index 11a7730d..d2cc7802 100644 --- a/forked-daapd.conf.in +++ b/forked-daapd.conf.in @@ -312,6 +312,9 @@ audio { # AirPlay password # password = "s1kr3t" + # Disable AirPlay 1 (RAOP) +# raop_disable = false + # Name used in the speaker list, overrides name from the device # nickname = "My speaker name" #} diff --git a/src/conffile.c b/src/conffile.c index bb65a49b..bd6b14a2 100644 --- a/src/conffile.c +++ b/src/conffile.c @@ -160,6 +160,7 @@ static cfg_opt_t sec_airplay[] = CFG_BOOL("permanent", cfg_false, CFGF_NONE), CFG_BOOL("reconnect", cfg_false, CFGF_NODEFAULT), CFG_STR("password", NULL, CFGF_NONE), + CFG_BOOL("raop_disable", cfg_false, CFGF_NONE), CFG_STR("nickname", NULL, CFGF_NONE), CFG_END() }; diff --git a/src/outputs/raop.c b/src/outputs/raop.c index cbfb67a0..dad52f37 100644 --- a/src/outputs/raop.c +++ b/src/outputs/raop.c @@ -4431,6 +4431,12 @@ raop_device_cb(const char *name, const char *type, const char *domain, const cha { DPRINTF(E_INFO, L_RAOP, "AirPlay device '%s' disappeared, but set as permanent in config\n", device_name); + return; + } + if (devcfg && cfg_getbool(devcfg, "raop_disable")) + { + DPRINTF(E_LOG, L_RAOP, "Disabling AirPlay 1 (RAOP) for device '%s' as set in config\n", device_name); + return; } if (devcfg && cfg_getstr(devcfg, "nickname"))