Skip to content

Commit

Permalink
[mpd] add "httpd" output plugin when enable_http_plugin
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
grobian authored and ejurgensen committed Aug 10, 2024
1 parent 8f3c99e commit 8eae742
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/mpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 8eae742

Please sign in to comment.