From: Jaroslav Kysela Date: Mon, 21 Oct 2019 07:43:43 +0000 (+0200) Subject: access: allow to change/set xmltv/htsp output format per matched entry X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0424fc0e30d07ba364fcf35daf34a0a72739f334;p=thirdparty%2Ftvheadend.git access: allow to change/set xmltv/htsp output format per matched entry --- diff --git a/src/access.c b/src/access.c index be0fd7ab1..7fb0faa27 100644 --- a/src/access.c +++ b/src/access.c @@ -690,8 +690,10 @@ access_update(access_t *a, access_entry_t *ae) a->aa_rights |= ae->ae_rights; } - a->aa_xmltv_output_format = ae->ae_xmltv_output_format; - a->aa_htsp_output_format = ae->ae_htsp_output_format; + if (ae->ae_change_xmltv_output_format) + a->aa_xmltv_output_format = ae->ae_xmltv_output_format; + if (ae->ae_change_htsp_output_format) + a->aa_htsp_output_format = ae->ae_htsp_output_format; } /** @@ -1121,6 +1123,8 @@ access_entry_create(const char *uuid, htsmsg_t *conf) ae->ae_change_chrange = 1; ae->ae_change_chtags = 1; ae->ae_change_rights = 1; + ae->ae_change_xmltv_output_format = 1; + ae->ae_change_htsp_output_format = 1; ae->ae_htsp_streaming = 1; ae->ae_htsp_dvr = 1; ae->ae_all_dvr = 1; @@ -1551,7 +1555,17 @@ static idnode_slist_t access_entry_class_change_slist[] = { { .id = "change_uilevel", .name = N_("User interface level"), - .off = offsetof(access_entry_t, ae_change_uilevel), + .off = offsetof(access_entry_t, ae_change_uilevel), + }, + { + .id = "change_xmltv_output", + .name = N_("XMLTV output format"), + .off = offsetof(access_entry_t, ae_change_xmltv_output_format), + }, + { + .id = "change_htsp_output", + .name = N_("HTSP output format"), + .off = offsetof(access_entry_t, ae_change_htsp_output_format), }, {} }; diff --git a/src/access.h b/src/access.h index 8e96593e6..4539a4645 100644 --- a/src/access.h +++ b/src/access.h @@ -135,8 +135,12 @@ typedef struct access_entry { int ae_conn_limit_type; uint32_t ae_conn_limit; int ae_change_conn_limit; + int ae_xmltv_output_format; + int ae_change_xmltv_output_format; + int ae_htsp_output_format; + int ae_change_htsp_output_format; int ae_dvr; int ae_htsp_dvr;