Also added additional updates based on comet data do multiple
clients would receive an update.
if(in != NULL)
htsmsg_destroy(in);
- if(out != NULL) {
- htsmsg_json_serialize(out, hq, 0);
- htsmsg_destroy(out);
- }
+ if(out == NULL)
+ out = htsmsg_create_map();
+ htsmsg_json_serialize(out, hq, 0);
+ htsmsg_destroy(out);
http_output_content(hc, "text/x-json; charset=UTF-8");
return 0;
}
op : "get"
}
});
+
+ tvheadend.comet.on(dtable, function(m){
+ if (m.reload)
+ store.reload();
+ });
}
function addRecord() {
Ext.MessageBox.alert('Server Error', 'Unable to delete');
},
success : function(response, options) {
- store.reload();
}
})
}
entries : Ext.encode(out)
},
success : function(response, options) {
+ // Note: this call is mostly redundant (comet update will pick it up anyway)
store.commitChanges();
},
failure : function(response, options) {