int mpegts_input_is_enabled ( mpegts_input_t * mi, mpegts_mux_t *mm, int flags );
+void mpegts_input_set_enabled ( mpegts_input_t *mi, int enabled );
+
void mpegts_input_empty_status ( mpegts_input_t *mi, tvh_input_stream_t *st );
const char *ntype = htsmsg_get_str(conf, "mpegts_network_type");
mpegts_network_t *mn;
+ if (LIST_FIRST(&lfe->mi_mux_active))
+ return;
mn = linuxdvb_frontend_wizard_network(lfe);
if (ntype && (mn == NULL || mn->mn_wizard)) {
htsmsg_t *nlist;
mpegts_network_wizard_create(ntype, &nlist, lang);
if (lfe->lfe_satconf) {
htsmsg_t *conf = htsmsg_create_map();
- htsmsg_add_msg(conf, "networks", nlist);
- linuxdvb_satconf_create(lfe, NULL, NULL, conf);
- mn = linuxdvb_frontend_wizard_network(lfe);
+ htsmsg_t *elems = htsmsg_create_list();
+ htsmsg_t *elem = htsmsg_create_map();
+ htsmsg_add_str(conf, "type", "simple");
+ htsmsg_add_bool(elem, "enable", 1);
+ htsmsg_add_msg(elem, "networks", nlist);
+ htsmsg_add_msg(elems, NULL, elem);
+ htsmsg_add_msg(conf, "elements", elems);
+ if (lfe->lfe_satconf) {
+ linuxdvb_satconf_delete(lfe->lfe_satconf, 0);
+ lfe->lfe_satconf = NULL;
+ }
+ lfe->lfe_satconf = linuxdvb_satconf_create(lfe, NULL, NULL, conf);
htsmsg_destroy(conf);
} else {
mpegts_input_set_networks((mpegts_input_t *)lfe, nlist);
htsmsg_destroy(nlist);
}
- if (mn) {
- mn->mn_wizard = 1;
- mn->mn_config_save(mn);
- }
+ if (linuxdvb_frontend_wizard_network(lfe))
+ mpegts_input_set_enabled((mpegts_input_t *)lfe, 1);
}
}
if (conf) {
/* Load elements */
- // Note: we do things this way else hte orbital_pos field in advanced
+ // Note: we do things this way else the orbital_pos field in advanced
// will result in extra elements
if ((l = htsmsg_get_list(conf, "elements"))) {
HTSMSG_FOREACH(f, l) {
return mi->mi_enabled;
}
+void
+mpegts_input_set_enabled ( mpegts_input_t *mi, int enabled )
+{
+ enabled = !!enabled;
+ if (mi->mi_enabled != enabled) {
+ htsmsg_t *conf = htsmsg_create_map();
+ htsmsg_add_bool(conf, "enabled", enabled);
+ idnode_update(&mi->ti_id, conf);
+ htsmsg_destroy(conf);
+ }
+}
+
static void
mpegts_input_display_name ( mpegts_input_t *mi, char *buf, size_t len )
{
if (nlist)
*nlist = NULL;
+
mnb = mpegts_network_builder_find(clazz);
if (mnb == NULL)
return;
+ /* only one network per type */
+ LIST_FOREACH(mn, &mpegts_network_all, mn_global_link)
+ if (mn->mn_id.in_class == mnb->idc)
+ goto found;
+
conf = htsmsg_create_map();
htsmsg_add_str(conf, "networkname", idclass_get_caption(mnb->idc, lang));
htsmsg_add_bool(conf, "wizard", 1);
mn = mnb->build(mnb->idc, conf);
htsmsg_destroy(conf);
+
+found:
if (mn && nlist) {
*nlist = htsmsg_create_list();
htsmsg_add_str(*nlist, NULL, idnode_uuid_as_str(&mn->mn_id, buf));
mn = satip_frontend_wizard_network(lfe);
if (ntype && lfe->sf_master == 0 && (mn == NULL || mn->mn_wizard)) {
htsmsg_t *conf = htsmsg_create_map();
+ htsmsg_t *list = htsmsg_create_list();
+ htsmsg_t *pos = htsmsg_create_map();
htsmsg_t *nlist;
mpegts_network_wizard_create(ntype, &nlist, lang);
- htsmsg_add_msg(conf, "networks", nlist);
+ htsmsg_add_bool(pos, "enabled", 1);
+ htsmsg_add_msg(pos, "networks", nlist);
+ htsmsg_add_msg(list, NULL, pos);
+ htsmsg_add_msg(conf, "satconf", list);
satip_satconf_create(lfe, conf, satip_frontend_default_positions(lfe));
htsmsg_destroy(conf);
+ if (satip_frontend_wizard_network(lfe))
+ mpegts_input_set_enabled((mpegts_input_t *)lfe, 1);
}
}
htsmsg_add_str(nlist, NULL, ntype);
mpegts_input_set_networks((mpegts_input_t *)hfe, nlist);
htsmsg_destroy(nlist);
+ if (tvhdhomerun_frontend_wizard_network(hfe))
+ mpegts_input_set_enabled((mpegts_input_t *)hfe, 1);
}
}
pw->pw_wizard = 1;
passwd_entry_save(pw);
}
+ htsmsg_destroy(conf);
}
if (w->username[0]) {
pw->pw_wizard = 1;
passwd_entry_save(pw);
}
+ htsmsg_destroy(conf);
}
}
}
if (idnode_is_instance(&mn->mn_id, &dvb_network_class) && w->muxes[idx][0]) {
dvb_network_scanfile_set((dvb_network_t *)mn, w->muxes[idx]);
} else if (idnode_is_instance(&mn->mn_id, &iptv_auto_network_class) &&
- w->iptv_url[0]) {
+ w->iptv_url[idx]) {
m = htsmsg_create_map();
htsmsg_add_str(m, "url", w->iptv_url[idx]);
idnode_load(&mn->mn_id, m);
MUXES_FCN(6)
DESCRIPTION_FCN(muxes, N_("\
-Assign predefined mxues to networks.\
+Assign predefined muxes to networks.\
"))
wizard_page_t *wizard_muxes(const char *lang)
mpegts_network_t *mn;
int idx, midx = 0;
- page->aux = w = calloc(1, sizeof(wizard_network_t));
+ page->aux = w = calloc(1, sizeof(wizard_muxes_t));
ic->ic_groups = groups;
ic->ic_properties = w->props;
ic->ic_save = muxes_save;
w->props[idx++] = nprops[midx * 3 + 2];
midx++;
} else if (idnode_is_instance(&mn->mn_id, &iptv_auto_network_class)) {
+ snprintf(w->iptv_url[midx], sizeof(w->iptv_url[midx]), "%s", ((iptv_network_t *)mn)->in_url ?: "");
w->props[idx++] = iptvprops[midx * 3 + 0];
w->props[idx++] = iptvprops[midx * 3 + 1];
w->props[idx++] = iptvprops[midx * 3 + 2];
},
ICON(),
DESCRIPTION(status),
- PREV_BUTTON(input),
+ PREV_BUTTON(muxes),
NEXT_BUTTON(mapping),
{}
};