mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-27 06:33:21 -05:00
[mpd] Implement 'channels' command (returns the special forked-daapd
channes like 'pairing')
This commit is contained in:
parent
eeef65f951
commit
989b44c8dc
17
src/mpd.c
17
src/mpd.c
@ -3819,6 +3819,21 @@ mpd_find_channel(const char *name)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int
|
||||
mpd_command_channels(struct evbuffer *evbuf, int argc, char **argv, char **errmsg)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; mpd_channels[i].handler; i++)
|
||||
{
|
||||
evbuffer_add_printf(evbuf,
|
||||
"channel: %s\n",
|
||||
mpd_channels[i].channel);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
mpd_command_sendmessage(struct evbuffer *evbuf, int argc, char **argv, char **errmsg)
|
||||
{
|
||||
@ -4381,7 +4396,7 @@ static struct mpd_command mpd_handlers[] =
|
||||
},
|
||||
{
|
||||
.mpdcommand = "channels",
|
||||
.handler = mpd_command_ignore
|
||||
.handler = mpd_command_channels
|
||||
},
|
||||
{
|
||||
.mpdcommand = "readmessages",
|
||||
|
Loading…
x
Reference in New Issue
Block a user