From 18acb73fdbcd0f6d6b137cd76f8146608a2dc1eb Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Fri, 16 Nov 2018 18:46:47 +0100 Subject: [PATCH] [raop] Add option to make an Airplay speaker permanent in the speaker list (issue #496) --- forked-daapd.conf.in | 5 +++++ src/outputs/raop.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/forked-daapd.conf.in b/forked-daapd.conf.in index 67c3f830..5a6c16ea 100644 --- a/forked-daapd.conf.in +++ b/forked-daapd.conf.in @@ -246,6 +246,11 @@ audio { # speaker list # exclude = false + # Enable this option to keep a particular AirPlay device in the speaker + # list and thus ignore mdns notifications about it no longer being + # present. The speaker will remain until restart of forked-daapd. +# permanent = false + # AirPlay password # password = "s1kr3t" #} diff --git a/src/outputs/raop.c b/src/outputs/raop.c index 2ede0d93..f3a8e246 100644 --- a/src/outputs/raop.c +++ b/src/outputs/raop.c @@ -4592,6 +4592,12 @@ raop_device_cb(const char *name, const char *type, const char *domain, const cha { DPRINTF(E_LOG, L_RAOP, "Excluding AirPlay device '%s' as set in config\n", at_name); + return; + } + if (airplay && cfg_getbool(airplay, "permanent") && (port < 0)) + { + DPRINTF(E_INFO, L_RAOP, "AirPlay device '%s' disappeared, but set as permanent in config\n", at_name); + return; }