if(dae->dae_brand)
if (!e->episode->brand || dae->dae_brand != e->episode->brand) return 0;
}
+ if(dae->dae_btype != DVR_AUTOREC_BTYPE_ALL) {
+ if (dae->dae_btype == DVR_AUTOREC_BTYPE_NEW && e->is_repeat)
+ return 0;
+ if (dae->dae_btype == DVR_AUTOREC_BTYPE_REPEAT && e->is_repeat == 0)
+ return 0;
+ }
if(dae->dae_title != NULL && dae->dae_title[0] != '\0') {
lang_str_ele_t *ls;
if (!dae->dae_fulltext) {
return strtab2htsmsg(tab, 1, lang);
}
+static htsmsg_t *
+dvr_autorec_entry_class_btype_list ( void *o, const char *lang )
+{
+ static const struct strtab tab[] = {
+ { N_("Any"),
+ DVR_AUTOREC_BTYPE_ALL },
+ { N_("New / premiere / unknown"),
+ DVR_AUTOREC_BTYPE_NEW },
+ { N_("Repeated"),
+ DVR_AUTOREC_BTYPE_REPEAT },
+ };
+ return strtab2htsmsg(tab, 1, lang);
+}
+
static uint32_t
dvr_autorec_entry_class_owner_opts(void *o)
{
.list = channel_tag_class_get_list,
.opts = PO_ADVANCED
},
+ {
+ .type = PT_U32,
+ .id = "btype",
+ .name = N_("Broadcast type"),
+ .desc = N_("Select type of broadcast (all, new/premiere or repeat)."),
+ .def.i = DVR_AUTOREC_BTYPE_ALL,
+ .off = offsetof(dvr_autorec_entry_t, dae_btype),
+ .list = dvr_autorec_entry_class_btype_list,
+ .opts = PO_HIDDEN | PO_ADVANCED,
+ },
+ {
+ .type = PT_U32,
+ .id = "content_type",
+ .name = N_("Content type"),
+ .desc = N_("The content type (Movie/Drama, Sports, etc.) to "
+ "be used to filter matching events/programmes."),
+ .list = dvr_autorec_entry_class_content_type_list,
+ .off = offsetof(dvr_autorec_entry_t, dae_content_type),
+ .opts = PO_ADVANCED
+ },
{
.type = PT_STR,
.id = "start",
.off = offsetof(dvr_autorec_entry_t, dae_maxduration),
.opts = PO_ADVANCED
},
- {
- .type = PT_U32,
- .id = "content_type",
- .name = N_("Content type"),
- .desc = N_("The content type (Movie/Drama, Sports, etc.) to "
- "be used to filter matching events/programmes."),
- .list = dvr_autorec_entry_class_content_type_list,
- .off = offsetof(dvr_autorec_entry_t, dae_content_type),
- .opts = PO_ADVANCED
- },
{
.type = PT_U32,
.id = "pri",
fulltext: { width: 70 },
channel: { width: 200 },
tag: { width: 200 },
+ btype: { width: 50 },
content_type: { width: 100 },
minduration: { width: 100 },
maxduration: { width: 100 },
add: {
url: 'api/dvr/autorec',
params: {
- list: 'enabled,name,directory,title,fulltext,channel,tag,content_type,minduration,' +
+ list: 'enabled,name,directory,title,fulltext,channel,tag,btype,content_type,minduration,' +
'maxduration,weekdays,start,start_window,pri,dedup,retention,removal,' +
'maxcount,maxsched,config_name,comment'
},
create: { }
},
del: true,
- list: 'enabled,name,directory,title,fulltext,channel,tag,content_type,minduration,' +
+ list: 'enabled,name,directory,title,fulltext,channel,tag,btype,content_type,minduration,' +
'maxduration,weekdays,start,start_window,pri,dedup,config_name,owner,creator,comment',
sort: {
field: 'name',