For comment: concept of filtering EPG on duration
This commit is contained in:
parent
37d7156f6c
commit
0c9e9b2461
1 changed files with 39 additions and 0 deletions
|
@ -332,6 +332,12 @@ tvheadend.epg = function() {
|
|||
header: "Duration",
|
||||
dataIndex: 'duration',
|
||||
renderer: renderDuration
|
||||
//IH
|
||||
}, {
|
||||
width: 100,
|
||||
id: 'duration',
|
||||
header: "Duration",
|
||||
dataIndex: 'duration'
|
||||
}, {
|
||||
width: 250,
|
||||
id: 'channel',
|
||||
|
@ -408,16 +414,36 @@ tvheadend.epg = function() {
|
|||
emptyText: 'Filter content type...'
|
||||
});
|
||||
|
||||
//IH
|
||||
var epgFilterDuration = new Ext.form.ComboBox({
|
||||
loadingText: 'Loading...',
|
||||
width: 150,
|
||||
displayField: 'label',
|
||||
store: new Ext.data.ArrayStore({
|
||||
fields: ['label','value'],
|
||||
data: [['Short (< 30m)', 30],['Medium (30m - 90m)', 60],['Long (> 90m)', 21600]]
|
||||
}),
|
||||
mode: 'local',
|
||||
editable: true,
|
||||
forceSelection: true,
|
||||
triggerAction: 'all',
|
||||
emptyText: 'Filter duration...'
|
||||
});
|
||||
|
||||
function epgQueryClear() {
|
||||
delete epgStore.baseParams.channel;
|
||||
delete epgStore.baseParams.tag;
|
||||
delete epgStore.baseParams.contenttype;
|
||||
delete epgStore.baseParams.title;
|
||||
//IH
|
||||
delete epgStore.baseParams.duration;
|
||||
|
||||
epgFilterChannels.setValue("");
|
||||
epgFilterChannelTags.setValue("");
|
||||
epgFilterContentGroup.setValue("");
|
||||
epgFilterTitle.setValue("");
|
||||
//IH
|
||||
epgFilterDuration.setValue("");
|
||||
|
||||
epgStore.reload();
|
||||
}
|
||||
|
@ -443,6 +469,16 @@ tvheadend.epg = function() {
|
|||
}
|
||||
});
|
||||
|
||||
//IH ------------------
|
||||
epgFilterDuration.on('select', function(c, r) {
|
||||
if (epgStore.baseParams.duration !== r.data.value) {
|
||||
console.log('Duration filter triggered with value',r.data.value);
|
||||
console.log('epgStore.baseParams.duration was ',epgStore.baseParams.duration);
|
||||
epgStore.baseParams.duration = r.data.value;
|
||||
console.log('epgStore.baseParams.duration is ',epgStore.baseParams.duration);
|
||||
}
|
||||
});
|
||||
|
||||
epgFilterTitle.on('valid', function(c) {
|
||||
var value = c.getValue();
|
||||
|
||||
|
@ -482,6 +518,9 @@ tvheadend.epg = function() {
|
|||
'-',
|
||||
epgFilterContentGroup,
|
||||
'-',
|
||||
//IH
|
||||
epgFilterDuration,
|
||||
'-',
|
||||
{
|
||||
text: 'Reset',
|
||||
handler: epgQueryClear
|
||||
|
|
Loading…
Add table
Reference in a new issue