diff --git a/src/epgdb.c b/src/epgdb.c index 30ee6caa..616ab4ed 100644 --- a/src/epgdb.c +++ b/src/epgdb.c @@ -227,8 +227,6 @@ void epg_init ( void ) munmap(mem, st.st_size); close(fd); - /* Create timer thread */ - } /* ************************************************************************** diff --git a/src/webui/simpleui.c b/src/webui/simpleui.c index af768ae1..36dcda10 100644 --- a/src/webui/simpleui.c +++ b/src/webui/simpleui.c @@ -471,6 +471,25 @@ page_status(http_connection_t *hc, return 0; } +/** + * flush epgdb to disk on call + */ +static int +page_epgsave(http_connection_t *hc, + const char *remain, void *opaque) +{ + htsbuf_queue_t *hq = &hc->hc_reply; + + htsbuf_qprintf(hq, "\n" + "1\n"); + + epg_save(); + + http_output_content(hc, "text/xml"); + + return 0; +} + /** @@ -483,5 +502,5 @@ simpleui_start(void) http_path_add("/eventinfo", NULL, page_einfo, ACCESS_SIMPLE); http_path_add("/pvrinfo", NULL, page_pvrinfo, ACCESS_SIMPLE); http_path_add("/status.xml", NULL, page_status, ACCESS_SIMPLE); - http_path_add("/epgflush", NULL, epg_save, ACCESS_SIMPLE); + http_path_add("/epgsave", NULL, page_epgsave, ACCESS_SIMPLE); }