name: 'abort',
builder: function() {
return new Ext.Toolbar.Button({
- tooltip: 'Abort selected recording',
+ tooltip: 'Abort the selected recording',
iconCls: 'cancel',
text: 'Abort',
disabled: true,
var actions = tvheadend.dvrRowActions();
+ var downloadButton = {
+ name: 'download',
+ builder: function() {
+ return new Ext.Toolbar.Button({
+ tooltip: 'Download the selected recording',
+ iconCls: 'save',
+ text: 'Download',
+ disabled: true
+ });
+ },
+ callback: function(conf, e, store, select) {
+ var r = select.getSelections();
+ if (r.length > 0) {
+ var url = r[0].data.url;
+ window.location = url;
+ }
+ }
+ };
+
+ function selected(s, abuttons) {
+ var count = s.getCount();
+ abuttons.download.setDisabled(count < 1);
+ }
+
tvheadend.idnode_grid(panel, {
url: 'api/dvr/entry',
gridURL: 'api/dvr/entry/grid_finished',
del: true,
list: 'disp_title,episode,start_real,stop_real,' +
'duration,filesize,channelname,creator,' +
- 'sched_status',
+ 'sched_status,url',
sort: {
field: 'start',
direction: 'DESC'
'?title=' + encodeURIComponent(title) + '">Play</a>';
}
}],
+ tbar: [downloadButton],
+ selected: selected,
help: function() {
new tvheadend.help('DVR', 'config_dvr.html');
},
pthread_mutex_lock(&global_lock);
- de = dvr_entry_find_by_id(atoi(remain));
+ de = dvr_entry_find_by_uuid(remain);
+ if (de == NULL)
+ de = dvr_entry_find_by_id(atoi(remain));
if(de == NULL || de->de_filename == NULL) {
pthread_mutex_unlock(&global_lock);
return 404;