From: Adam Sutton Date: Sat, 19 Jan 2013 23:24:16 +0000 (+0000) Subject: Fix #1524 - webui: ignore mux updates from different adapter. X-Git-Tag: v3.5~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39a2272b56fd6faeabf766b31e6c1c2b3d3b5f91;p=thirdparty%2Ftvheadend.git Fix #1524 - webui: ignore mux updates from different adapter. These were causing the store to be unecessarily reloaded and as a result the enabled flag would get cleared in the middle of editing. --- diff --git a/src/dvb/dvb_multiplex.c b/src/dvb/dvb_multiplex.c index 37d3ca172..9341988d6 100644 --- a/src/dvb/dvb_multiplex.c +++ b/src/dvb/dvb_multiplex.c @@ -1010,6 +1010,8 @@ dvb_mux_build_msg(th_dvb_mux_instance_t *tdmi) htsmsg_t *m = htsmsg_create_map(); char buf[100]; + htsmsg_add_str(m, "adapterId", tdmi->tdmi_adapter->tda_identifier); + htsmsg_add_str(m, "id", tdmi->tdmi_identifier); htsmsg_add_u32(m, "enabled", tdmi->tdmi_enabled); htsmsg_add_str(m, "network", tdmi->tdmi_network ?: ""); diff --git a/src/webui/static/app/dvb.js b/src/webui/static/app/dvb.js index 4ef9063ec..5710640ae 100644 --- a/src/webui/static/app/dvb.js +++ b/src/webui/static/app/dvb.js @@ -120,6 +120,9 @@ tvheadend.dvb_muxes = function(adapterData, satConfStore) { tvheadend.comet.on('dvbMux', function(m) { + if(m.adapterId !== adapterId) + return; + r = store.getById(m.id) if (typeof r === 'undefined') { store.reload();