th_dvb_adapter_t *tda;
char buf[50], buf2[500], buf3[20];
const char *txt;
- int fetype, n;
+ int fetype, n, m;
th_transport_t *t;
int o = 1, v;
int csize[10];
cells[3] = txt;
- n = 0;
- LIST_FOREACH(t, &tdmi->tdmi_transports, tht_mux_link)
+ n = m = 0;
+ LIST_FOREACH(t, &tdmi->tdmi_transports, tht_mux_link) {
n++;
-
- snprintf(buf3, sizeof(buf3), "%d", n);
+ if(transport_is_available(t))
+ m++;
+ }
+ snprintf(buf3, sizeof(buf3), "%d / %d", m, n);
cells[4] = buf3;
cells[5] = NULL;
LIST_INIT(&head);
LIST_FOREACH(t, &tdmi->tdmi_transports, tht_mux_link) {
- if(transport_servicetype_txt(t) == NULL)
- continue;
- LIST_INSERT_SORTED(&head, t, tht_tmp_link, dvbsvccmp);
+ if(transport_is_available(t))
+ LIST_INSERT_SORTED(&head, t, tht_tmp_link, dvbsvccmp);
}
ajax_box_begin(&tq, AJAX_BOX_SIDEBOX, NULL, NULL, buf);
t->tht_servicetype == ST_AC_SDTV ||
t->tht_servicetype == ST_AC_HDTV;
}
+
+/**
+ *
+ */
+int
+transport_is_available(th_transport_t *t)
+{
+ return transport_servicetype_txt(t) && LIST_FIRST(&t->tht_streams);
+}