From 489476c4ee09960a65778ab9ffec8dd1cbf055de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20T=C3=B6rnblom?= Date: Mon, 3 Sep 2012 16:04:27 +0200 Subject: [PATCH] added date and time to dvr playlists --- src/webui/webui.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/webui/webui.c b/src/webui/webui.c index 4e87b0b1..2f5dec09 100644 --- a/src/webui/webui.c +++ b/src/webui/webui.c @@ -383,11 +383,13 @@ http_dvr_list_playlist(http_connection_t *hc) durration = de->de_stop - de->de_start; durration += (de->de_stop_extra + de->de_start_extra)*60; bandwidth = ((8*fsize) / (durration*1024.0)); + strftime(buf, sizeof(buf), "%FT%T%z", localtime(&(de->de_start))); htsbuf_qprintf(hq, "#EXTINF:%"PRItime_t",%s\n", durration, lang_str_get(de->de_title, NULL)); htsbuf_qprintf(hq, "#EXT-X-TARGETDURATION:%"PRItime_t"\n", durration); htsbuf_qprintf(hq, "#EXT-X-STREAM-INF:PROGRAM-ID=%d,BANDWIDTH=%d\n", de->de_id, bandwidth); + htsbuf_qprintf(hq, "#EXT-X-PROGRAM-DATE-TIME:%s\n", buf); snprintf(buf, sizeof(buf), "/dvrfile/%d", de->de_id); htsbuf_qprintf(hq, "http://%s%s?ticket=%s\n", host, buf, @@ -420,12 +422,14 @@ http_dvr_playlist(http_connection_t *hc, dvr_entry_t *de) if(fsize) { bandwidth = ((8*fsize) / (durration*1024.0)); + strftime(buf, sizeof(buf), "%FT%T%z", localtime(&(de->de_start))); htsbuf_qprintf(hq, "#EXTM3U\n"); htsbuf_qprintf(hq, "#EXTINF:%"PRItime_t",%s\n", durration, lang_str_get(de->de_title, NULL)); htsbuf_qprintf(hq, "#EXT-X-TARGETDURATION:%"PRItime_t"\n", durration); htsbuf_qprintf(hq, "#EXT-X-STREAM-INF:PROGRAM-ID=%d,BANDWIDTH=%d\n", de->de_id, bandwidth); + htsbuf_qprintf(hq, "#EXT-X-PROGRAM-DATE-TIME:%s\n", buf); snprintf(buf, sizeof(buf), "/dvrfile/%d", de->de_id); ticket_id = access_ticket_create(buf);