mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-10 05:08:11 -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)
|
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;
|
struct output_device *device;
|
||||||
|
const char *friendly_name;
|
||||||
uint32_t id;
|
uint32_t id;
|
||||||
|
|
||||||
id = djb_hash(name, strlen(name));
|
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;
|
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);
|
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));
|
device = calloc(1, sizeof(struct output_device));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user