Display recording status in EPG grid

Patch by Chris Dekter
This commit is contained in:
Andreas Öman 2010-03-26 07:35:27 +00:00
parent 3dcc1f2be2
commit 7b626dfeac
2 changed files with 21 additions and 2 deletions

View file

@ -680,6 +680,11 @@ extjs_epg(http_connection_t *hc, const char *remain, void *opaque)
if(e->e_content_type != NULL &&
e->e_content_type->ect_group->ecg_name != NULL)
htsmsg_add_str(m, "contentgrp", e->e_content_type->ect_group->ecg_name);
dvr_entry_t *de;
if((de = dvr_entry_find_by_event(e)) != NULL)
htsmsg_add_str(m, "schedstate", dvr_entry_schedstatus(de));
htsmsg_add_msg(array, NULL, m);
}

View file

@ -78,6 +78,17 @@ tvheadend.epgDetails = function(event) {
tvheadend.epg = function() {
var xg = Ext.grid;
var actions = new Ext.ux.grid.RowActions({
header:'',
width:20,
dataIndex: 'actions',
actions: [
{
iconIndex:'schedstate'
}
]
});
var epgStore = new Ext.ux.grid.livegrid.Store({
autoLoad: true,
url: 'epg',
@ -99,7 +110,8 @@ tvheadend.epg = function() {
{name: 'start', type: 'date', dateFormat: 'U' /* unix time */},
{name: 'end', type: 'date', dateFormat: 'U' /* unix time */},
{name: 'duration'},
{name: 'contentgrp'}
{name: 'contentgrp'},
{name: 'schedstate'}
])
});
@ -144,6 +156,7 @@ tvheadend.epg = function() {
}
var epgCm = new Ext.grid.ColumnModel([
actions,
{
width: 250,
id:'title',
@ -151,7 +164,7 @@ tvheadend.epg = function() {
dataIndex: 'title',
renderer: renderText
},{
width: 250,
width: 100,
id:'episode',
header: "Episode",
dataIndex: 'episode',
@ -296,6 +309,7 @@ tvheadend.epg = function() {
var panel = new Ext.ux.grid.livegrid.GridPanel({
enableDragDrop : false,
cm: epgCm,
plugins: [actions],
title: 'Electronic Program Guide',
iconCls: 'newspaper',
store : epgStore,