Only display transports which are really available to us
This commit is contained in:
parent
716de668ce
commit
b86e40a8d9
3 changed files with 20 additions and 8 deletions
|
@ -540,7 +540,7 @@ ajax_adaptermuxlist(http_connection_t *hc, const char *remain, void *opaque)
|
|||
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];
|
||||
|
@ -610,11 +610,13 @@ ajax_adaptermuxlist(http_connection_t *hc, const char *remain, void *opaque)
|
|||
|
||||
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;
|
||||
|
||||
|
@ -658,9 +660,8 @@ ajax_dvbmuxeditor(http_connection_t *hc, const char *remain, void *opaque)
|
|||
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);
|
||||
|
|
|
@ -521,3 +521,12 @@ transport_is_tv(th_transport_t *t)
|
|||
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);
|
||||
}
|
||||
|
|
|
@ -47,4 +47,6 @@ const char *transport_servicetype_txt(th_transport_t *t);
|
|||
|
||||
int transport_is_tv(th_transport_t *t);
|
||||
|
||||
int transport_is_available(th_transport_t *t);
|
||||
|
||||
#endif /* TRANSPORTS_H */
|
||||
|
|
Loading…
Add table
Reference in a new issue