Commit 428c1f1f authored by Ed "oddsock" Zaleski's avatar Ed "oddsock" Zaleski
Browse files

- force touches when mp3 metadata is updated via admin interface

svn path=/trunk/icecast/; revision=5007
parent 1726d0cd
......@@ -604,6 +604,10 @@ static void command_metadata(client_t *client, source_t *source)
char *action;
char *value;
mp3_state *state;
#ifdef USE_YP
int i;
time_t current_time;
DEBUG0("Got metadata update request");
......@@ -632,6 +636,16 @@ static void command_metadata(client_t *client, source_t *source)
DEBUG2("Metadata on mountpoint %s changed to \"%s\"",
source->mount, value);
stats_event(source->mount, "title", value);
#ifdef USE_YP
/* If we get an update on the mountpoint, force a
yp touch */
current_time = time(NULL);
for (i=0; i<source->num_yp_directories; i++) {
source->ypdata[i]->yp_last_touch = current_time -
source->ypdata[i]->yp_touch_interval + 2;
html_success(client, "Metadata update successful");
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment