Add ability to record series from the EPG window.
This commit is contained in:
parent
840e4ff020
commit
0a7803676a
2 changed files with 21 additions and 7 deletions
|
@ -881,7 +881,7 @@ extjs_dvr(http_connection_t *hc, const char *remain, void *opaque)
|
|||
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");
|
||||
|
||||
|
@ -904,8 +904,11 @@ extjs_dvr(http_connection_t *hc, const char *remain, void *opaque)
|
|||
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);
|
||||
|
|
|
@ -70,7 +70,7 @@ tvheadend.epgDetails = function(event) {
|
|||
title: event.title,
|
||||
bodyStyle: 'margin: 5px',
|
||||
layout: 'fit',
|
||||
width: 400,
|
||||
width: 500,
|
||||
height: 300,
|
||||
constrainHeader: true,
|
||||
buttons: [
|
||||
|
@ -78,20 +78,31 @@ tvheadend.epgDetails = function(event) {
|
|||
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()
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue