diff --git a/src/httpd_dacp.c b/src/httpd_dacp.c index 24f10e58..87e424b7 100644 --- a/src/httpd_dacp.c +++ b/src/httpd_dacp.c @@ -510,7 +510,7 @@ playqueuecontents_add_queue_item(struct evbuffer *songlist, struct db_queue_item } static void -speaker_enum_cb(uint64_t id, const char *name, int relvol, int absvol, struct spk_flags flags, void *arg) +speaker_enum_cb(uint64_t id, const char *name, const char *output_type, int relvol, int absvol, struct spk_flags flags, void *arg) { struct evbuffer *evbuf; int len; diff --git a/src/mpd.c b/src/mpd.c index 609a4358..fcf1f51f 100644 --- a/src/mpd.c +++ b/src/mpd.c @@ -3254,7 +3254,7 @@ mpd_command_password(struct evbuffer *evbuf, int argc, char **argv, char **errms * Adds a new struct output to the given struct outputs in *arg for the given speaker (id, name, etc.). */ static void -outputs_enum_cb(uint64_t id, const char *name, int relvol, int absvol, struct spk_flags flags, void *arg) +outputs_enum_cb(uint64_t id, const char *name, const char *output_type, int relvol, int absvol, struct spk_flags flags, void *arg) { struct outputs *outputs; struct output *output; @@ -3549,7 +3549,7 @@ mpd_command_toggleoutput(struct evbuffer *evbuf, int argc, char **argv, char **e * outputvolume: 50 */ static void -speaker_enum_cb(uint64_t id, const char *name, int relvol, int absvol, struct spk_flags flags, void *arg) +speaker_enum_cb(uint64_t id, const char *name, const char *output_type, int relvol, int absvol, struct spk_flags flags, void *arg) { struct evbuffer *evbuf; diff --git a/src/player.c b/src/player.c index 25702dfd..46ac066f 100644 --- a/src/player.c +++ b/src/player.c @@ -2385,8 +2385,10 @@ speaker_enumerate(void *arg, int *retval) flags.selected = device->selected; flags.has_password = device->has_password; flags.has_video = device->has_video; + flags.requires_auth = device->requires_auth; + flags.needs_auth_key = (device->requires_auth && device->auth_key == NULL); - spk_enum->cb(device->id, device->name, device->relvol, device->volume, flags, spk_enum->arg); + spk_enum->cb(device->id, device->name, device->type_name, device->relvol, device->volume, flags, spk_enum->arg); #ifdef DEBUG_RELVOL DPRINTF(E_DBG, L_PLAYER, "*** %s: abs %d rel %d\n", device->name, device->volume, device->relvol); diff --git a/src/player.h b/src/player.h index ff64ba36..c9148e88 100644 --- a/src/player.h +++ b/src/player.h @@ -31,6 +31,8 @@ enum repeat_mode { struct spk_flags { unsigned selected:1; unsigned has_password:1; + unsigned requires_auth:1; + unsigned needs_auth_key:1; unsigned has_video:1; }; @@ -55,7 +57,7 @@ struct player_status { uint32_t len_ms; }; -typedef void (*spk_enum_cb)(uint64_t id, const char *name, int relvol, int absvol, struct spk_flags flags, void *arg); +typedef void (*spk_enum_cb)(uint64_t id, const char *name, const char *output_type, int relvol, int absvol, struct spk_flags flags, void *arg); struct player_history {