Project

General

Profile

Feature #319 ยป tvheadend_add_initalscan_setting.diff

whyz -, 2010-10-29 23:02

View differences:

src/webui/static/app/dvb.js (working copy)
1008 1008

  
1009 1009
    var confreader = new Ext.data.JsonReader({
1010 1010
	root: 'dvbadapters'
1011
    }, ['name', 'automux', 'idlescan', 'diseqcversion', 'qmon',
1011
	}, ['name', 'automux', 'idlescan', 'initialscan', 'diseqcversion', 'qmon',
1012 1012
	'dumpmux', 'nitoid']);
1013 1013

  
1014 1014
    
......
1035 1035
	    name: 'idlescan'
1036 1036
	}),
1037 1037
	new Ext.form.Checkbox({
1038
	    fieldLabel: 'Initial scanning at startup',
1039
	    name: 'initialscan'
1040
	}),
1041

  
1042
	new Ext.form.Checkbox({
1038 1043
	    fieldLabel: 'Monitor signal quality',
1039 1044
	    name: 'qmon'
1040 1045
	}),
src/webui/extjs_dvb.c (working copy)
150 150
    htsmsg_add_str(r, "name", tda->tda_displayname);
151 151
    htsmsg_add_u32(r, "automux", tda->tda_autodiscovery);
152 152
    htsmsg_add_u32(r, "idlescan", tda->tda_idlescan);
153
    htsmsg_add_u32(r, "initialscan", tda->tda_initialscan);
153 154
    htsmsg_add_u32(r, "qmon", tda->tda_qmon);
154 155
    htsmsg_add_u32(r, "dumpmux", tda->tda_dump_muxes);
155 156
    htsmsg_add_u32(r, "nitoid", tda->tda_nitoid);
......
170 171
    s = http_arg_get(&hc->hc_req_args, "idlescan");
171 172
    dvb_adapter_set_idlescan(tda, !!s);
172 173

  
174
    s = http_arg_get(&hc->hc_req_args, "initialscan");
175
    dvb_adapter_set_initialscan(tda, !!s);
176

  
173 177
    s = http_arg_get(&hc->hc_req_args, "qmon");
174 178
    dvb_adapter_set_qmon(tda, !!s);
175 179

  
src/dvb/dvb_multiplex.c (working copy)
707 707
    dmc.dmc_satconf = NULL;
708 708

  
709 709
  tdmi = dvb_mux_create(tda, &dmc,
710
			tsid, htsmsg_get_str(m, "network"), NULL, enabled, 1,
710
			tsid, htsmsg_get_str(m, "network"), NULL, enabled, tda->tda_initialscan,
711 711
			identifier);
712

  
712 713
  if(tdmi != NULL) {
713 714

  
714 715
    if((s = htsmsg_get_str(m, "status")) != NULL)
src/dvb/dvb.h (working copy)
166 166
  uint32_t tda_qmon;
167 167
  uint32_t tda_nitoid;
168 168
  uint32_t tda_diseqc_version;
169
  uint32_t tda_initialscan;
169 170
  char *tda_displayname;
170 171

  
171 172
  int tda_fe_fd;
......
222 223

  
223 224
void dvb_adapter_set_idlescan(th_dvb_adapter_t *tda, int on);
224 225

  
226
void dvb_adapter_set_initialscan(th_dvb_adapter_t *tda, int on);
227

  
225 228
void dvb_adapter_set_qmon(th_dvb_adapter_t *tda, int on);
226 229

  
227 230
void dvb_adapter_set_dump_muxes(th_dvb_adapter_t *tda, int on);
src/dvb/dvb_adapter.c (working copy)
86 86
  htsmsg_add_u32(m, "dump_muxes", tda->tda_dump_muxes);
87 87
  htsmsg_add_u32(m, "nitoid", tda->tda_nitoid);
88 88
  htsmsg_add_u32(m, "diseqc_version", tda->tda_diseqc_version);
89
  htsmsg_add_u32(m, "initialscan", tda->tda_initialscan);
89 90
  hts_settings_save(m, "dvbadapters/%s", tda->tda_identifier);
90 91
  htsmsg_destroy(m);
91 92
}
......
151 152
  tda_save(tda);
152 153
}
153 154

  
155
/**
156
 *
157
 */
158
void
159
dvb_adapter_set_initialscan(th_dvb_adapter_t *tda, int on)
160
{
161
  if(tda->tda_initialscan == on)
162
    return;
154 163

  
164
  lock_assert(&global_lock);
165

  
166
  tvhlog(LOG_NOTICE, "dvb", "Adapter \"%s\" initial mux scanning set to: %s",
167
	 tda->tda_displayname, on ? "On" : "Off");
168

  
169
  tda->tda_initialscan = on;
170
  tda_save(tda);
171
}
172

  
173

  
174

  
155 175
/**
156 176
 *
157 177
 */
......
383 403
      htsmsg_get_u32(c, "dump_muxes", &tda->tda_dump_muxes);
384 404
      htsmsg_get_u32(c, "nitoid", &tda->tda_nitoid);
385 405
      htsmsg_get_u32(c, "diseqc_version", &tda->tda_diseqc_version);
406
      tda->tda_initialscan = htsmsg_get_u32_or_default(c, "initialscan", 1);
386 407
    }
387 408
    htsmsg_destroy(l);
388 409
  }
    (1-1/1)