[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
This commit is contained in:
parent
3614b6c93b
commit
6f4fc91fef
1 changed files with 1 additions and 25 deletions
|
@ -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',
|
||||
|
|
Loading…
Add table
Reference in a new issue