From 5381eb006aa738981f9a9535882f85a2a039bb5b Mon Sep 17 00:00:00 2001 From: Adam Sutton Date: Tue, 31 Jul 2012 15:06:23 +0100 Subject: [PATCH] Move epggrab module and channel lists to global vars so they can be used elsewhere. --- src/webui/static/app/epggrab.js | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/webui/static/app/epggrab.js b/src/webui/static/app/epggrab.js index 42189f39..1abcc492 100644 --- a/src/webui/static/app/epggrab.js +++ b/src/webui/static/app/epggrab.js @@ -1,3 +1,19 @@ +tvheadend.epggrabModules = new Ext.data.JsonStore({ + root : 'entries', + url : 'epggrab', + baseParams : { op : 'moduleList' }, + autoLoad : true, + fields : [ 'id', 'name', 'path', 'type', 'enabled' ] +}); + +tvheadend.epggrabChannels = new Ext.data.JsonStore({ + root : 'entries', + url : 'epggrab', + baseParams : { op : 'channelList' }, + fields : [ 'id', 'mod', 'name', 'icon', 'number', 'channel', + 'mod-id', 'mod-name' ] +}); + tvheadend.epggrab = function() { /* **************************************************************** @@ -11,13 +27,7 @@ tvheadend.epggrab = function() { var EPGGRAB_MODULE_EXTERNAL = 1; var EPGGRAB_MODULE_OTA = 2; - var moduleStore = new Ext.data.JsonStore({ - root : 'entries', - url : 'epggrab', - baseParams : { op : 'moduleList' }, - autoLoad : true, - fields : [ 'id', 'name', 'path', 'type', 'enabled' ] - }); + var moduleStore = tvheadend.epggrabModules; var internalModuleStore = new Ext.data.Store({ recordType: moduleStore.recordType });