From 13e6889990bddffe58ac2cbe7973f0302c88fad4 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Fri, 10 Feb 2017 19:27:52 +0100 Subject: [PATCH] [cast] Use friendly device name from mdns announcement --- src/outputs/cast.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/outputs/cast.c b/src/outputs/cast.c index e57f13c9..6da01d8f 100644 --- a/src/outputs/cast.c +++ b/src/outputs/cast.c @@ -1229,6 +1229,7 @@ static void cast_device_cb(const char *name, const char *type, const char *domain, const char *hostname, int family, const char *address, int port, struct keyval *txt) { struct output_device *device; + const char *friendly_name; uint32_t id; id = djb_hash(name, strlen(name)); @@ -1238,6 +1239,10 @@ cast_device_cb(const char *name, const char *type, const char *domain, const cha return; } + friendly_name = keyval_get(txt, "fn"); + if (friendly_name) + name = friendly_name; + DPRINTF(E_DBG, L_CAST, "Event for Chromecast device '%s' (port %d, id %" PRIu32 ")\n", name, port, id); device = calloc(1, sizeof(struct output_device));