]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Added a play link to the epg-details. Should fix #207. It will use the embedded vlc...
authorsb1066 <sb1066@gmail.com>
Sat, 30 Oct 2010 09:03:06 +0000 (09:03 +0000)
committersb1066 <sb1066@gmail.com>
Sat, 30 Oct 2010 09:03:06 +0000 (09:03 +0000)
src/webui/extjs.c
src/webui/static/app/epg.js

index b3ff9762ddfdb4365b12800f083796906d2ee924..8c5a56368ed6ead509c41a0bff84bf5b326ae5a2 100644 (file)
@@ -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);
     }
index bc308783a47ef05bf98b76db613c6261e43effb9..471565aef3c47dd0cb009e72a2aafad3d7b16e2c 100644 (file)
@@ -32,7 +32,13 @@ tvheadend.epgDetails = function(event) {
 
     content += '<div class="x-epg-meta"><a target="_blank" href="' + 
        'http://akas.imdb.org/find?q=' + event.title + '">Search IMDB</a></div>'
-       
+
+    now = new Date();
+    if(event.start < now && event.end > now) {
+      content += "<div class=\"x-epg-meta\">" +
+            "<a href=\"javascript:tvheadend.VLC('stream/channelid/" +
+            event.channelid + "')\">Play</a>" + "</div>";
+    }
 
     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'},