if (src->aa_auth)
dst->aa_auth = strdup(src->aa_auth);
dst->aa_xmltv_output_format = src->aa_xmltv_output_format;
+ dst->aa_htsp_output_format = src->aa_htsp_output_format;
return dst;
}
}
a->aa_xmltv_output_format = ae->ae_xmltv_output_format;
+ a->aa_htsp_output_format = ae->ae_htsp_output_format;
}
/**
return strtab2htsmsg(xmltv_output_format_tab, 1, lang);
}
+static htsmsg_t *
+access_entry_htsp_output_format_enum ( void *p, const char *lang )
+{
+ static struct strtab
+ htsp_output_format_tab[] = {
+ { N_("All"), ACCESS_HTSP_OUTPUT_FORMAT_ALL },
+ { N_("Basic"), ACCESS_HTSP_OUTPUT_FORMAT_BASIC },
+ };
+ return strtab2htsmsg(htsp_output_format_tab, 1, lang);
+}
+
htsmsg_t *
language_get_list ( void *obj, const char *lang )
{
PROP_DOC(streaming_profile)
PROP_DOC(change_parameters)
PROP_DOC(xmltv_output_format)
+PROP_DOC(htsp_output_format)
const idclass_t access_entry_class = {
.ic_class = "access",
.list = access_entry_xmltv_output_format_enum,
.opts = PO_ADVANCED | PO_DOC_NLIST,
},
+ {
+ .type = PT_INT,
+ .id = "htsp_output_format",
+ .name = N_("Format for htsp output"),
+ .desc = N_("Specify format for htsp output."),
+ .doc = prop_doc_htsp_output_format,
+ .off = offsetof(access_entry_t, ae_htsp_output_format),
+ .list = access_entry_htsp_output_format_enum,
+ .opts = PO_ADVANCED | PO_DOC_NLIST,
+ },
{
.type = PT_STR,
.id = "comment",
epg_episode_num_t epnum;
const char *str;
char buf[512];
+ const int of = htsp->htsp_granted_access->aa_htsp_output_format;
/* Ignore? */
if (update && e->updated <= update) return NULL;
htsmsg_add_s64(out, "stop", e->stop);
if ((str = epg_broadcast_get_title(e, lang)))
htsmsg_add_str(out, "title", str);
- if (htsp->htsp_version < 32) {
- if ((str = epg_broadcast_get_description(e, lang))) {
- htsmsg_add_str(out, "description", str);
- if ((str = epg_broadcast_get_summary(e, lang)))
- htsmsg_add_str(out, "summary", str);
- if ((str = epg_broadcast_get_subtitle(e, lang)))
- htsmsg_add_str(out, "subtitle", str);
- } else if ((str = epg_broadcast_get_summary(e, lang))) {
- htsmsg_add_str(out, "description", str);
+ /* For basic format, we want to skip the large text fields
+ * and go straight to doing the low-overhead fields.
+ */
+ if (of != ACCESS_HTSP_OUTPUT_FORMAT_BASIC) {
+ if (htsp->htsp_version < 32) {
+ if ((str = epg_broadcast_get_description(e, lang))) {
+ htsmsg_add_str(out, "description", str);
+ if ((str = epg_broadcast_get_summary(e, lang)))
+ htsmsg_add_str(out, "summary", str);
+ if ((str = epg_broadcast_get_subtitle(e, lang)))
+ htsmsg_add_str(out, "subtitle", str);
+ } else if ((str = epg_broadcast_get_summary(e, lang))) {
+ htsmsg_add_str(out, "description", str);
+ if ((str = epg_broadcast_get_subtitle(e, lang)))
+ htsmsg_add_str(out, "subtitle", str);
+ } else if ((str = epg_broadcast_get_subtitle(e, lang))) {
+ htsmsg_add_str(out, "description", str);
+ }
+ } else {
if ((str = epg_broadcast_get_subtitle(e, lang)))
htsmsg_add_str(out, "subtitle", str);
- } else if ((str = epg_broadcast_get_subtitle(e, lang))) {
- htsmsg_add_str(out, "description", str);
+ if ((str = epg_broadcast_get_summary(e, lang)))
+ htsmsg_add_str(out, "summary", str);
+ if ((str = epg_broadcast_get_description(e, lang)))
+ htsmsg_add_str(out, "description", str);
}
- } else {
- if ((str = epg_broadcast_get_subtitle(e, lang)))
- htsmsg_add_str(out, "subtitle", str);
- if ((str = epg_broadcast_get_summary(e, lang)))
- htsmsg_add_str(out, "summary", str);
- if ((str = epg_broadcast_get_description(e, lang)))
- htsmsg_add_str(out, "description", str);
- }
- if (e->credits)
- htsmsg_add_msg(out, "credits", htsmsg_copy(e->credits));
- if (e->category)
- string_list_serialize(e->category, out, "category");
- if (e->keyword)
- string_list_serialize(e->keyword, out, "keyword");
+ if (e->credits)
+ htsmsg_add_msg(out, "credits", htsmsg_copy(e->credits));
+ if (e->category)
+ string_list_serialize(e->category, out, "category");
+ if (e->keyword)
+ string_list_serialize(e->keyword, out, "keyword");
+ }
if (e->serieslink)
htsmsg_add_str(out, "serieslinkUri", e->serieslink->uri);