From: Sam Stenvall Date: Tue, 5 Aug 2014 08:31:06 +0000 (+0300) Subject: [webui] update all DVR stores on "dvrdb" notifications X-Git-Tag: v4.1~1631 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f4fc91fef2eec0d7a777f741d8c2bb8754a59d4;p=thirdparty%2Ftvheadend.git [webui] update all DVR stores on "dvrdb" notifications This way a finished/aborted recording correctly appears in the corresponding tab without having to reload the page --- diff --git a/src/webui/static/app/dvr.js b/src/webui/static/app/dvr.js index 06ab8a3f6..ee2fecb15 100644 --- a/src/webui/static/app/dvr.js +++ b/src/webui/static/app/dvr.js @@ -792,15 +792,6 @@ tvheadend.dvr = function() { tvheadend.dvrStoreFailed]; - function updateDvrStore(store, r, m) { - r.data.status = m.status; - r.data.schedstate = m.schedstate; - - store.afterEdit(r); - store.fireEvent('updated', store, r, - Ext.data.Record.COMMIT); - } - function reloadStores() { for (var i = 0; i < tvheadend.dvrStores.length; i++) { tvheadend.dvrStores[i].reload(); @@ -808,22 +799,7 @@ tvheadend.dvr = function() { } tvheadend.comet.on('dvrdb', function(m) { - - if (m.reload != null) { - reloadStores(); - } - - if (m.updateEntry != null) { - for (var i = 0; i < tvheadend.dvrStores.length; i++) { - var store = tvheadend.dvrStores[i]; - r = tvheadend.dvrStoreUpcoming.getById(m.id); - if (typeof r !== 'undefined') { - updateDvrStore(store, r, m); - return; - } - } - reloadStores(); - } + reloadStores(); }); tvheadend.autorecRecord = Ext.data.Record.create(['enabled', 'title',