diff --git a/dvb.c b/dvb.c index 67a7d74b..458fa74c 100644 --- a/dvb.c +++ b/dvb.c @@ -875,7 +875,6 @@ tdmi_initial_scan_timeout(void *aux, int64_t now) th_dvb_mux_instance_t *tdmi = aux; th_dvb_adapter_t *tda = tdmi->tdmi_adapter; const char *err; - th_dvb_table_t *tdt; dtimer_disarm(&tdmi->tdmi_initial_scan_timer); @@ -996,6 +995,6 @@ dvb_mux_scanner(void *aux, int64_t now) if(tdmi == NULL) return; /* no instances */ - dvb_tune_tdmi(tdmi, 0, TDMI_RUNNING); + dvb_tune_tdmi(tdmi, 0, TDMI_IDLESCAN); } diff --git a/dvb_dvr.c b/dvb_dvr.c index 50113fb5..4f46dcfd 100644 --- a/dvb_dvr.c +++ b/dvb_dvr.c @@ -158,6 +158,11 @@ dvb_start_feed(th_transport_t *t, unsigned int weight) if(tdmi->tdmi_state == TDMI_RUNNING) goto gotmux; + if(tdmi->tdmi_state == TDMI_IDLESCAN) { + tdmi->tdmi_state = TDMI_RUNNING; + goto gotmux; + } + w = transport_compute_weight(&tdmi->tdmi_adapter->tda_transports); if(w < weight && cand == NULL) cand = tdmi; diff --git a/htmlui.c b/htmlui.c index 9d50be5a..a0d6219f 100644 --- a/htmlui.c +++ b/htmlui.c @@ -841,6 +841,9 @@ page_status(http_connection_t *hc, const char *remain, void *opaque) case TDMI_RUNNING: txt = "Running"; break; + case TDMI_IDLESCAN: + txt = "IdleScan"; + break; } tcp_qprintf(&tq, diff --git a/htsclient.c b/htsclient.c index ecfcda0f..cb3e3d18 100644 --- a/htsclient.c +++ b/htsclient.c @@ -168,6 +168,11 @@ print_tdmi(client_t *c, th_dvb_mux_instance_t *tdmi) cprintf(c, "Running since %s", ctime(&tdmi->tdmi_got_adapter)); cprintf(c, "\t Current status: "); break; + + case TDMI_IDLESCAN: + cprintf(c, "Idle but scanning\n"); + cprintf(c, "\t Current status: "); + break; } if(tdmi->tdmi_status != NULL) { diff --git a/tvhead.h b/tvhead.h index ce02c88c..48059c57 100644 --- a/tvhead.h +++ b/tvhead.h @@ -127,6 +127,7 @@ typedef enum { TDMI_INITIAL_SCAN, TDMI_IDLE, TDMI_RUNNING, + TDMI_IDLESCAN, } tdmi_state_t; /*