},
{
.type = PT_INT,
+ .islist = 1,
.id = "mapopt",
.name = N_("Channel mapping options"),
.desc = N_("Options to use/used when mapping "
.get = bouquet_class_mapopt_get,
.set = bouquet_class_mapopt_set,
.rend = bouquet_class_mapopt_rend,
- .opts = PO_ADVANCED,
- .islist = 1
+ .opts = PO_ADVANCED
},
{
.type = PT_INT,
+ .islist = 1,
.id = "chtag",
.name = N_("Create tags"),
.desc = N_("Create and link these tags to channels when "
.get = bouquet_class_chtag_get,
.set = bouquet_class_chtag_set,
.rend = bouquet_class_chtag_rend,
- .opts = PO_ADVANCED,
- .islist = 1
+ .opts = PO_ADVANCED
},
{
.type = PT_STR,
for (o = options; o->id; o++) {
ip = (void *)in + o->off;
- HTSMSG_FOREACH(f, vals) {
- if ((s = htsmsg_field_get_str(f)) != NULL)
- continue;
- if (strcmp(s, o->id))
- continue;
- if (*ip == 0) changed = 1;
- break;
+ if (!changed) {
+ HTSMSG_FOREACH(f, vals) {
+ if ((s = htsmsg_field_get_str(f)) != NULL)
+ continue;
+ if (strcmp(s, o->id))
+ continue;
+ if (*ip == 0) changed = 1;
+ break;
+ }
+ if (f == NULL && *ip) changed = 1;
}
- if (f == NULL && *ip) changed = 1;
+ *ip = 0;
}
HTSMSG_FOREACH(f, vals) {
- if ((s = htsmsg_field_get_str(f)) != NULL)
+ if ((s = htsmsg_field_get_str(f)) == NULL)
continue;
for (o = options; o->id; o++) {
if (strcmp(o->id, s)) continue;