return HTTP_STATUS_UNAUTHORIZED;
}
- if(!strcmp(op, "recordEvent")) {
+ if(!strcmp(op, "recordEvent") || !strcmp(op, "recordSeries")) {
const char *config_name = http_arg_get(&hc->hc_req_args, "config_name");
tvhlog(LOG_INFO,"dvr","User '%s' has no dvr config with identical name, using default...", hc->hc_username);
}
- dvr_entry_create_by_event(config_name,
- e, hc->hc_representative, NULL, DVR_PRIO_NORMAL);
+ if (!strcmp(op, "recordEvent"))
+ dvr_entry_create_by_event(config_name,
+ e, hc->hc_representative, NULL, DVR_PRIO_NORMAL);
+ else
+ dvr_autorec_add_series_link(config_name, e, hc->hc_representative, "Created from EPG query");
out = htsmsg_create_map();
htsmsg_add_u32(out, "success", 1);
title: event.title,
bodyStyle: 'margin: 5px',
layout: 'fit',
- width: 400,
+ width: 500,
height: 300,
constrainHeader: true,
buttons: [
new Ext.Button({
handler: recordEvent,
text: "Record program"
- })
+ }),
+ new Ext.Button({
+ handler: recordSeries,
+ text: "Record series"
+ })
],
buttonAlign: 'center',
html: content
});
win.show();
-
function recordEvent() {
+ record('recordEvent');
+ }
+
+ function recordSeries() {
+ record('recordSeries');
+ }
+
+ function record(op) {
Ext.Ajax.request({
url: 'dvr',
params: {
eventId: event.id,
- op: 'recordEvent',
+ op: op,
config_name: confcombo.getValue()
},