1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2025-02-02 15:07:36 -05:00

*** empty log message ***

svn path=/trunk/icecast/; revision=5863
This commit is contained in:
Karl Heyes 2004-02-25 20:11:31 +00:00
parent 7371d0ab21
commit f6f31cdc24

@ -34,7 +34,6 @@
#include "xslt.h" #include "xslt.h"
#include "format.h" #include "format.h"
#include "format_mp3.h"
#include "logging.h" #include "logging.h"
#ifdef _WIN32 #ifdef _WIN32
@ -642,7 +641,7 @@ static void command_metadata(client_t *client, source_t *source)
{ {
char *action; char *action;
char *value; char *value;
mp3_state *state; format_plugin_t *format;
#ifdef USE_YP #ifdef USE_YP
int i; int i;
time_t current_time; time_t current_time;
@ -653,27 +652,28 @@ static void command_metadata(client_t *client, source_t *source)
COMMAND_REQUIRE(client, "mode", action); COMMAND_REQUIRE(client, "mode", action);
COMMAND_REQUIRE(client, "song", value); COMMAND_REQUIRE(client, "song", value);
if(source->format->type != FORMAT_TYPE_MP3) { format = source->format;
client_send_400(client, "Not mp3, cannot update metadata"); if (format->type != FORMAT_TYPE_MP3)
{
client_send_400 (client, "Not mp3, cannot update metadata");
return; return;
} }
if(strcmp(action, "updinfo") != 0) { if (strcmp (action, "updinfo") != 0)
client_send_400(client, "No such action"); {
client_send_400 (client, "No such action");
return; return;
} }
if (format->set_tag)
state = source->format->_state; {
if (value)
thread_mutex_lock(&(state->lock)); format->set_tag (format, "title", value);
free(state->metadata); }
state->metadata = strdup(value);
state->metadata_age++;
thread_mutex_unlock(&(state->lock));
DEBUG2("Metadata on mountpoint %s changed to \"%s\"", DEBUG2("Metadata on mountpoint %s changed to \"%s\"",
source->mount, value); source->mount, value);
stats_event(source->mount, "title", value); stats_event(source->mount, "title", value);
#ifdef USE_YP #ifdef USE_YP
/* If we get an update on the mountpoint, force a /* If we get an update on the mountpoint, force a
yp touch */ yp touch */
@ -684,7 +684,6 @@ static void command_metadata(client_t *client, source_t *source)
} }
#endif #endif
html_success(client, "Metadata update successful"); html_success(client, "Metadata update successful");
} }