From 428c1f1f36972110c3af55cffdf0695e1b06b4fc Mon Sep 17 00:00:00 2001 From: oddsock Date: Thu, 26 Jun 2003 13:31:17 +0000 Subject: [PATCH] - force touches when mp3 metadata is updated via admin interface svn path=/trunk/icecast/; revision=5007 --- src/admin.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/admin.c b/src/admin.c index 20b22e7f..029cb89a 100644 --- a/src/admin.c +++ b/src/admin.c @@ -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; +#endif 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; inum_yp_directories; i++) { + source->ypdata[i]->yp_last_touch = current_time - + source->ypdata[i]->yp_touch_interval + 2; + } +#endif + html_success(client, "Metadata update successful"); } -- GitLab