mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-04 18:36:02 -05:00
[raop] Add option to exclude particular devices from speaker list
This commit is contained in:
parent
ef13abe2cf
commit
fce68ebd1a
@ -202,6 +202,10 @@ audio {
|
|||||||
# you can set a lower value here
|
# you can set a lower value here
|
||||||
# max_volume = 11
|
# max_volume = 11
|
||||||
|
|
||||||
|
# Enable this option to exclude a particular AirPlay device from the
|
||||||
|
# speaker list
|
||||||
|
# exclude = false
|
||||||
|
|
||||||
# AirPlay password
|
# AirPlay password
|
||||||
# password = "s1kr3t"
|
# password = "s1kr3t"
|
||||||
#}
|
#}
|
||||||
|
@ -109,6 +109,7 @@ static cfg_opt_t sec_audio[] =
|
|||||||
static cfg_opt_t sec_airplay[] =
|
static cfg_opt_t sec_airplay[] =
|
||||||
{
|
{
|
||||||
CFG_INT("max_volume", 11, CFGF_NONE),
|
CFG_INT("max_volume", 11, CFGF_NONE),
|
||||||
|
CFG_BOOL("exclude", cfg_false, CFGF_NONE),
|
||||||
CFG_STR("password", NULL, CFGF_NONE),
|
CFG_STR("password", NULL, CFGF_NONE),
|
||||||
CFG_END()
|
CFG_END()
|
||||||
};
|
};
|
||||||
|
@ -4009,6 +4009,14 @@ raop_device_cb(const char *name, const char *type, const char *domain, const cha
|
|||||||
|
|
||||||
DPRINTF(E_DBG, L_RAOP, "Event for AirPlay device %s (port %d, id %" PRIx64 ")\n", at_name, port, id);
|
DPRINTF(E_DBG, L_RAOP, "Event for AirPlay device %s (port %d, id %" PRIx64 ")\n", at_name, port, id);
|
||||||
|
|
||||||
|
airplay = cfg_gettsec(cfg, "airplay", at_name);
|
||||||
|
if (airplay && cfg_getbool(airplay, "exclude"))
|
||||||
|
{
|
||||||
|
DPRINTF(E_LOG, L_RAOP, "Excluding AirPlay device '%s' as set in config\n", at_name);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
rd = calloc(1, sizeof(struct output_device));
|
rd = calloc(1, sizeof(struct output_device));
|
||||||
if (!rd)
|
if (!rd)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user