From a9dafa807bf8898b60fdf82c8aaeaa4770e76327 Mon Sep 17 00:00:00 2001 From: sb1066 Date: Sat, 30 Oct 2010 09:03:06 +0000 Subject: [PATCH] Added a play link to the epg-details. Should fix #207. It will use the embedded vlc player though --- src/webui/extjs.c | 1 + src/webui/static/app/epg.js | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/webui/extjs.c b/src/webui/extjs.c index b3ff9762..8c5a5636 100644 --- a/src/webui/extjs.c +++ b/src/webui/extjs.c @@ -695,6 +695,7 @@ extjs_epg(http_connection_t *hc, const char *remain, void *opaque) if(e->e_channel != NULL) { htsmsg_add_str(m, "channel", e->e_channel->ch_name); + htsmsg_add_u32(m, "channelid", e->e_channel->ch_id); if(e->e_channel->ch_icon != NULL) htsmsg_add_str(m, "chicon", e->e_channel->ch_icon); } diff --git a/src/webui/static/app/epg.js b/src/webui/static/app/epg.js index bc308783..471565ae 100644 --- a/src/webui/static/app/epg.js +++ b/src/webui/static/app/epg.js @@ -32,7 +32,13 @@ tvheadend.epgDetails = function(event) { content += '
Search IMDB
' - + + now = new Date(); + if(event.start < now && event.end > now) { + content += "
" + + "Play" + "
"; + } var confcombo = new Ext.form.ComboBox({ store: tvheadend.configNames, @@ -117,6 +123,7 @@ tvheadend.epg = function() { },[ {name: 'id'}, {name: 'channel'}, + {name: 'channelid'}, {name: 'title'}, {name: 'episode'}, {name: 'description'},