[mpd] add "httpd" output plugin when enable_http_plugin

Return MPD-compatible output of plugin type "httpd" when
enable_http_plugin in mpd section of the config is set.

Signed-off-by: Fabian Groffen <grobian@gentoo.org>
This commit is contained in:
Fabian Groffen 2024-08-09 16:40:09 +02:00 committed by ejurgensen
parent 8f3c99ec43
commit 8eae74257d
1 changed files with 13 additions and 0 deletions

View File

@ -3793,6 +3793,19 @@ mpd_command_outputs(struct evbuffer *evbuf, int argc, char **argv, char **errmsg
player_speaker_enumerate(speaker_enum_cb, &param);
/* streaming output is not in the speaker list, so add it as pseudo
* element when configured to do so */
if (mpd_plugin_httpd)
{
evbuffer_add_printf(evbuf,
"outputid: %u\n"
"outputname: MP3 stream\n"
"plugin: httpd\n"
"outputenabled: 1\n",
param.nextid);
param.nextid++;
}
return 0;
}