mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-27 06:33:21 -05:00
[cast] Use friendly device name from mdns announcement
This commit is contained in:
parent
d2fe608c72
commit
13e6889990
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user