[cast] Put back Chromecast exclude option

Was removed by mistake in commit f8b0147
This commit is contained in:
ejurgensen 2019-05-16 23:04:33 +02:00
parent 31d852993f
commit c8650a0450

View File

@ -1395,6 +1395,7 @@ cast_device_cb(const char *name, const char *type, const char *domain, const cha
{ {
struct output_device *device; struct output_device *device;
const char *friendly_name; const char *friendly_name;
cfg_t *chromecast;
uint32_t id; uint32_t id;
id = djb_hash(name, strlen(name)); 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); 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)); device = calloc(1, sizeof(struct output_device));
if (!device) if (!device)
{ {