Index: src/webui/static/app/dvb.js =================================================================== --- src/webui/static/app/dvb.js (revision 5538) +++ src/webui/static/app/dvb.js (working copy) @@ -1008,7 +1008,7 @@ var confreader = new Ext.data.JsonReader({ root: 'dvbadapters' - }, ['name', 'automux', 'idlescan', 'diseqcversion', 'qmon', + }, ['name', 'automux', 'idlescan', 'initialscan', 'diseqcversion', 'qmon', 'dumpmux', 'nitoid']); @@ -1035,6 +1035,11 @@ name: 'idlescan' }), new Ext.form.Checkbox({ + fieldLabel: 'Initial scanning at startup', + name: 'initialscan' + }), + + new Ext.form.Checkbox({ fieldLabel: 'Monitor signal quality', name: 'qmon' }), Index: src/webui/extjs_dvb.c =================================================================== --- src/webui/extjs_dvb.c (revision 5538) +++ src/webui/extjs_dvb.c (working copy) @@ -150,6 +150,7 @@ htsmsg_add_str(r, "name", tda->tda_displayname); htsmsg_add_u32(r, "automux", tda->tda_autodiscovery); htsmsg_add_u32(r, "idlescan", tda->tda_idlescan); + htsmsg_add_u32(r, "initialscan", tda->tda_initialscan); htsmsg_add_u32(r, "qmon", tda->tda_qmon); htsmsg_add_u32(r, "dumpmux", tda->tda_dump_muxes); htsmsg_add_u32(r, "nitoid", tda->tda_nitoid); @@ -170,6 +171,9 @@ s = http_arg_get(&hc->hc_req_args, "idlescan"); dvb_adapter_set_idlescan(tda, !!s); + s = http_arg_get(&hc->hc_req_args, "initialscan"); + dvb_adapter_set_initialscan(tda, !!s); + s = http_arg_get(&hc->hc_req_args, "qmon"); dvb_adapter_set_qmon(tda, !!s); Index: src/dvb/dvb_multiplex.c =================================================================== --- src/dvb/dvb_multiplex.c (revision 5538) +++ src/dvb/dvb_multiplex.c (working copy) @@ -707,8 +707,9 @@ dmc.dmc_satconf = NULL; tdmi = dvb_mux_create(tda, &dmc, - tsid, htsmsg_get_str(m, "network"), NULL, enabled, 1, + tsid, htsmsg_get_str(m, "network"), NULL, enabled, tda->tda_initialscan, identifier); + if(tdmi != NULL) { if((s = htsmsg_get_str(m, "status")) != NULL) Index: src/dvb/dvb.h =================================================================== --- src/dvb/dvb.h (revision 5538) +++ src/dvb/dvb.h (working copy) @@ -166,6 +166,7 @@ uint32_t tda_qmon; uint32_t tda_nitoid; uint32_t tda_diseqc_version; + uint32_t tda_initialscan; char *tda_displayname; int tda_fe_fd; @@ -222,6 +223,8 @@ void dvb_adapter_set_idlescan(th_dvb_adapter_t *tda, int on); +void dvb_adapter_set_initialscan(th_dvb_adapter_t *tda, int on); + void dvb_adapter_set_qmon(th_dvb_adapter_t *tda, int on); void dvb_adapter_set_dump_muxes(th_dvb_adapter_t *tda, int on); Index: src/dvb/dvb_adapter.c =================================================================== --- src/dvb/dvb_adapter.c (revision 5538) +++ src/dvb/dvb_adapter.c (working copy) @@ -86,6 +86,7 @@ htsmsg_add_u32(m, "dump_muxes", tda->tda_dump_muxes); htsmsg_add_u32(m, "nitoid", tda->tda_nitoid); htsmsg_add_u32(m, "diseqc_version", tda->tda_diseqc_version); + htsmsg_add_u32(m, "initialscan", tda->tda_initialscan); hts_settings_save(m, "dvbadapters/%s", tda->tda_identifier); htsmsg_destroy(m); } @@ -151,7 +152,26 @@ tda_save(tda); } +/** + * + */ +void +dvb_adapter_set_initialscan(th_dvb_adapter_t *tda, int on) +{ + if(tda->tda_initialscan == on) + return; + lock_assert(&global_lock); + + tvhlog(LOG_NOTICE, "dvb", "Adapter \"%s\" initial mux scanning set to: %s", + tda->tda_displayname, on ? "On" : "Off"); + + tda->tda_initialscan = on; + tda_save(tda); +} + + + /** * */ @@ -383,6 +403,7 @@ htsmsg_get_u32(c, "dump_muxes", &tda->tda_dump_muxes); htsmsg_get_u32(c, "nitoid", &tda->tda_nitoid); htsmsg_get_u32(c, "diseqc_version", &tda->tda_diseqc_version); + tda->tda_initialscan = htsmsg_get_u32_or_default(c, "initialscan", 1); } htsmsg_destroy(l); }