mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
Feature: Support updates of metadata URL via admin interface
Thanks to Joakim Lagerqvist. Closes: #2385
This commit is contained in:
parent
4896d73d3a
commit
72fbe999e2
@ -1061,7 +1061,7 @@ static void command_metadata(client_t *client,
|
|||||||
admin_format_t response)
|
admin_format_t response)
|
||||||
{
|
{
|
||||||
const char *action;
|
const char *action;
|
||||||
const char *song, *title, *artist, *charset;
|
const char *song, *title, *artist, *charset, *url;
|
||||||
format_plugin_t *plugin;
|
format_plugin_t *plugin;
|
||||||
xmlDocPtr doc;
|
xmlDocPtr doc;
|
||||||
xmlNodePtr node;
|
xmlNodePtr node;
|
||||||
@ -1083,6 +1083,7 @@ static void command_metadata(client_t *client,
|
|||||||
COMMAND_OPTIONAL(client, "title", title);
|
COMMAND_OPTIONAL(client, "title", title);
|
||||||
COMMAND_OPTIONAL(client, "artist", artist);
|
COMMAND_OPTIONAL(client, "artist", artist);
|
||||||
COMMAND_OPTIONAL(client, "charset", charset);
|
COMMAND_OPTIONAL(client, "charset", charset);
|
||||||
|
COMMAND_OPTIONAL(client, "url", url);
|
||||||
|
|
||||||
if (strcmp (action, "updinfo") != 0) {
|
if (strcmp (action, "updinfo") != 0) {
|
||||||
xmlNewTextChild(node, NULL, XMLSTR("message"), XMLSTR("No such action"));
|
xmlNewTextChild(node, NULL, XMLSTR("message"), XMLSTR("No such action"));
|
||||||
@ -1109,6 +1110,10 @@ static void command_metadata(client_t *client,
|
|||||||
source->mount, artist, title);
|
source->mount, artist, title);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (url) {
|
||||||
|
plugin->set_tag(plugin, "url", url, charset);
|
||||||
|
ICECAST_LOG_INFO("Metadata (url) on mountpoint %s changed to \"%H\"", source->mount, url);
|
||||||
|
}
|
||||||
/* updates are now done, let them be pushed into the stream */
|
/* updates are now done, let them be pushed into the stream */
|
||||||
plugin->set_tag (plugin, NULL, NULL, NULL);
|
plugin->set_tag (plugin, NULL, NULL, NULL);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user