char *dae_title;
regex_t dae_title_preg;
+ int dae_fulltext;
uint32_t dae_content_type;
dvr_prio_t pri, int retention, const char *comment);
dvr_autorec_entry_t *
-dvr_autorec_create_htsp(const char *dvr_config_name, const char *title,
+dvr_autorec_create_htsp(const char *dvr_config_name, const char *title, int fulltext,
channel_t *ch, uint32_t enabled, int32_t start,
int32_t start_window, uint32_t days, time_t start_extra,
time_t stop_extra, dvr_prio_t pri, int retention,
}
if(dae->dae_title != NULL && dae->dae_title[0] != '\0') {
lang_str_ele_t *ls;
- if(!e->episode->title) return 0;
- RB_FOREACH(ls, e->episode->title, link)
- if (!regexec(&dae->dae_title_preg, ls->str, 0, NULL, 0)) break;
+ if (!dae->dae_fulltext) {
+ if(!e->episode->title) return 0;
+ RB_FOREACH(ls, e->episode->title, link)
+ if (!regexec(&dae->dae_title_preg, ls->str, 0, NULL, 0)) break;
+ } else {
+ ls = NULL;
+ if (e->episode->title)
+ RB_FOREACH(ls, e->episode->title, link)
+ if (!regexec(&dae->dae_title_preg, ls->str, 0, NULL, 0)) break;
+ if (!ls && e->episode->subtitle)
+ RB_FOREACH(ls, e->episode->subtitle, link)
+ if (!regexec(&dae->dae_title_preg, ls->str, 0, NULL, 0)) break;
+ if (!ls && e->summary)
+ RB_FOREACH(ls, e->summary, link)
+ if (!regexec(&dae->dae_title_preg, ls->str, 0, NULL, 0)) break;
+ if (!ls && e->description)
+ RB_FOREACH(ls, e->description, link)
+ if (!regexec(&dae->dae_title_preg, ls->str, 0, NULL, 0)) break;
+ }
if (!ls) return 0;
}
dvr_autorec_entry_t*
-dvr_autorec_create_htsp(const char *dvr_config_name, const char *title,
+dvr_autorec_create_htsp(const char *dvr_config_name, const char *title, int fulltext,
channel_t *ch, uint32_t enabled, int32_t start, int32_t start_window,
uint32_t weekdays, time_t start_extra, time_t stop_extra,
dvr_prio_t pri, int retention,
htsmsg_add_s64(conf, "start_extra", start_extra);
htsmsg_add_s64(conf, "stop_extra", stop_extra);
htsmsg_add_str(conf, "title", title);
+ htsmsg_add_u32(conf, "fulltext", 1);
htsmsg_add_str(conf, "config_name", dvr_config_name ?: "");
htsmsg_add_str(conf, "owner", owner ?: "");
htsmsg_add_str(conf, "creator", creator ?: "");
.set = dvr_autorec_entry_class_title_set,
.off = offsetof(dvr_autorec_entry_t, dae_title),
},
+ {
+ .type = PT_BOOL,
+ .id = "fulltext",
+ .name = "Fulltext",
+ .off = offsetof(dvr_autorec_entry_t, dae_fulltext),
+ },
{
.type = PT_STR,
.id = "channel",
htsmsg_add_s64(out, "startExtra", dae->dae_start_extra);
htsmsg_add_s64(out, "stopExtra", dae->dae_stop_extra);
- if(dae->dae_title)
+ if(dae->dae_title) {
htsmsg_add_str(out, "title", dae->dae_title);
+ htsmsg_add_u32(out, "fulltext", dae->dae_fulltext);
+ }
if(dae->dae_name)
htsmsg_add_str(out, "name", dae->dae_name);
if(dae->dae_directory)
dvr_autorec_entry_t *dae;
const char *dvr_config_name, *title, *creator, *comment, *name, *directory;
int64_t start_extra, stop_extra;
- uint32_t u32, days_of_week, priority, min_duration, max_duration, retention, enabled;
+ uint32_t u32, days_of_week, priority, min_duration, max_duration;
+ uint32_t retention, enabled, fulltext;
int32_t approx_time, start, start_window;
channel_t *ch = NULL;
/* Options */
if(!(title = htsmsg_get_str(in, "title")))
return htsp_error("Invalid arguments");
+ if(htsmsg_get_u32(in, "fulltext", &fulltext))
+ fulltext = 0;
dvr_config_name = htsp_dvr_config_name(htsp, htsmsg_get_str(in, "configName"));
if(!htsmsg_get_u32(in, "channelId", &u32))
ch = channel_find_by_id(u32);
if (ch && !htsp_user_access_channel(htsp, ch))
return htsp_error("User does not have access");
- dae = dvr_autorec_create_htsp(dvr_config_name, title, ch, enabled, start, start_window, days_of_week,
+ dae = dvr_autorec_create_htsp(dvr_config_name, title, fulltext,
+ ch, enabled, start, start_window, days_of_week,
start_extra, stop_extra, priority, retention, min_duration, max_duration,
htsp->htsp_granted_access->aa_username, creator, comment, name, directory);
name: { width: 200 },
directory: { width: 200 },
title: { width: 300 },
+ fulltext: { width: 70 },
channel: { width: 200 },
tag: { width: 200 },
content_type: { width: 100 },
- minduration: { width: 80 },
- maxduration: { width: 80 },
+ minduration: { width: 100 },
+ maxduration: { width: 100 },
weekdays: { width: 160 },
- start: { width: 120 },
- start_window: { width: 100 },
+ start: { width: 80 },
+ start_window: { width: 80 },
+ start_extra: { width: 80 },
+ stop_extra: { width: 80 },
+ weekdays: {
+ width: 120,
+ renderer: function(st) { return tvheadend.weekdaysRenderer(st); }
+ },
pri: { width: 80 },
+ retention: { width: 80 },
config_name: { width: 120 },
owner: { width: 100 },
creator: { width: 200 },
add: {
url: 'api/dvr/autorec',
params: {
- list: 'enabled,name,directory,title,channel,tag,content_type,minduration,' +
+ list: 'enabled,name,directory,title,fulltext,channel,tag,content_type,minduration,' +
'maxduration,weekdays,start,start_window,pri,config_name,comment'
},
create: { }
},
del: true,
- list: 'enabled,name,directory,title,channel,tag,content_type,minduration,' +
+ list: 'enabled,name,directory,title,fulltext,channel,tag,content_type,minduration,' +
'maxduration,weekdays,start,start_window,pri,config_name,owner,creator,comment',
- columns: {
- weekdays: {
- renderer: function(st) { return tvheadend.weekdaysRenderer(st); }
- }
- },
sort: {
field: 'name',
direction: 'ASC'
directory: { width: 200 },
title: { width: 300 },
channel: { width: 200 },
- weekdays: { width: 160 },
+ weekdays: {
+ width: 120,
+ renderer: function(st) { return tvheadend.weekdaysRenderer(st); }
+ },
start: { width: 120 },
stop: { width: 120 },
pri: { width: 80 },
},
del: true,
list: 'enabled,name,directory,title,channel,weekdays,start,stop,pri,config_name,owner,creator,comment',
- columns: {
- weekdays: {
- renderer: function(st) { return tvheadend.weekdaysRenderer(st); }
- }
- },
sort: {
field: 'name',
direction: 'ASC'
var title = epgStore.baseParams.title ? epgStore.baseParams.title
: "<i>Don't care</i>";
+ var fulltext = epgStore.baseParams.fulltext ? " <i>(Fulltext)</i>" : "";
var channel = epgStore.baseParams.channel ? tvheadend.channelLookupName(epgStore.baseParams.channel)
: "<i>Don't care</i>";
var tag = epgStore.baseParams.channelTag ? tvheadend.channelTagLookupName(epgStore.baseParams.channelTag)
Ext.MessageBox.confirm('Auto Recorder', 'This will create an automatic rule that '
+ 'continuously scans the EPG for programmes '
+ 'to record that match this query: ' + '<br><br>'
- + '<div class="x-smallhdr">Title:</div>' + title + '<br>'
+ + '<div class="x-smallhdr">Title:</div>' + title + fulltext + '<br>'
+ '<div class="x-smallhdr">Channel:</div>' + channel + '<br>'
+ '<div class="x-smallhdr">Tag:</div>' + tag + '<br>'
+ '<div class="x-smallhdr">Genre:</div>' + contentType + '<br>'
comment: 'Created from EPG query'
};
if (params.title) conf.title = params.title;
+ if (params.fulltext) conf.fulltext = params.fulltext;
if (params.channel) conf.channel = params.channel;
if (params.channelTag) conf.tag = params.channelTag;
if (params.contentType) conf.content_type = params.contentType;