mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-23 20:53:19 -05:00
[cast] Put back Chromecast exclude option
Was removed by mistake in commit f8b0147
This commit is contained in:
parent
31d852993f
commit
c8650a0450
@ -1395,6 +1395,7 @@ cast_device_cb(const char *name, const char *type, const char *domain, const cha
|
||||
{
|
||||
struct output_device *device;
|
||||
const char *friendly_name;
|
||||
cfg_t *chromecast;
|
||||
uint32_t id;
|
||||
|
||||
id = djb_hash(name, strlen(name));
|
||||
@ -1410,6 +1411,13 @@ cast_device_cb(const char *name, const char *type, const char *domain, const cha
|
||||
|
||||
DPRINTF(E_DBG, L_CAST, "Event for Chromecast device '%s' (port %d, id %" PRIu32 ")\n", name, port, id);
|
||||
|
||||
chromecast = cfg_gettsec(cfg, "chromecast", name);
|
||||
if (chromecast && cfg_getbool(chromecast, "exclude"))
|
||||
{
|
||||
DPRINTF(E_LOG, L_CAST, "Excluding Chromecast device '%s' as set in config\n", name);
|
||||
return;
|
||||
}
|
||||
|
||||
device = calloc(1, sizeof(struct output_device));
|
||||
if (!device)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user