From 1c6ac2848c83880d6ae135dcf9c22f9d37bc995d Mon Sep 17 00:00:00 2001 From: Glenn-1990 Date: Mon, 17 Oct 2016 20:46:36 +0200 Subject: [PATCH] Add defaults for channels/bouquets and make better use of interface levels --- src/bouquet.c | 4 ++++ src/channels.c | 10 ++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/bouquet.c b/src/bouquet.c index fb1812685..c6eb56bd5 100644 --- a/src/bouquet.c +++ b/src/bouquet.c @@ -94,6 +94,9 @@ bouquet_create(const char *uuid, htsmsg_t *conf, bq->bq_active_services = idnode_set_create(1); bq->bq_ext_url_period = 60; bq->bq_mapencrypted = 1; + bq->bq_mapradio = 1; + bq->bq_maptoch = 1; + bq->bq_chtag = 1; if (idnode_insert(&bq->bq_id, uuid, &bouquet_class, 0)) { if (uuid) @@ -978,6 +981,7 @@ const idclass_t bouquet_class = { .id = "enabled", .name = N_("Enabled"), .desc = N_("Enable/disable the bouquet."), + .def.i = 1, .off = offsetof(bouquet_t, bq_enabled), .notify = bouquet_class_enabled_notify, }, diff --git a/src/channels.c b/src/channels.c index dfe8f3db3..4c3ce3660 100644 --- a/src/channels.c +++ b/src/channels.c @@ -376,6 +376,7 @@ const idclass_t channel_class = { .id = "enabled", .name = N_("Enabled"), .desc = N_("Enable/disable the channel."), + .def.i = 1, .off = offsetof(channel_t, ch_enabled), }, { @@ -439,6 +440,7 @@ const idclass_t channel_class = { "turn this option off, only the OTA EPG grabber " "will be used for this channel unless you've " "specifically set a different EPG Source."), + .def.i = 1, .off = offsetof(channel_t, ch_epgauto), .opts = PO_ADVANCED, }, @@ -489,7 +491,7 @@ const idclass_t channel_class = { .doc = prop_doc_runningstate, .off = offsetof(channel_t, ch_epg_running), .list = channel_class_epg_running_list, - .opts = PO_ADVANCED | PO_DOC_NLIST, + .opts = PO_EXPERT | PO_DOC_NLIST, }, { .type = PT_STR, @@ -501,7 +503,6 @@ const idclass_t channel_class = { .set = channel_class_services_set, .list = channel_class_services_enum, .rend = channel_class_services_rend, - .opts = PO_ADVANCED }, { .type = PT_STR, @@ -1419,6 +1420,7 @@ const idclass_t channel_tag_class = { .id = "enabled", .name = N_("Enabled"), .desc = N_("Enable/disable the tag."), + .def.i = 1, .off = offsetof(channel_tag_t, ct_enabled), }, { @@ -1452,7 +1454,7 @@ const idclass_t channel_tag_class = { "no tags at all) set in " "access configuration to use the tag."), .off = offsetof(channel_tag_t, ct_private), - .opts = PO_ADVANCED + .opts = PO_EXPERT }, { .type = PT_STR, @@ -1479,7 +1481,7 @@ const idclass_t channel_tag_class = { .desc = N_("If set, presentation of the tag icon will not " "superimpose the tag name on top of the icon."), .off = offsetof(channel_tag_t, ct_titled_icon), - .opts = PO_ADVANCED + .opts = PO_EXPERT }, { .type = PT_STR, -- 2.47.3