Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
WEBUI: Cosmetic change, add PLAY and DOWNLOAD button to Failed Record…
…ings
  • Loading branch information
pepsonEL authored and perexg committed Oct 14, 2014
1 parent 4fb3066 commit 78cb1ba
Show file tree
Hide file tree
Showing 3 changed files with 137 additions and 9 deletions.
79 changes: 79 additions & 0 deletions docs/html/dvrfailed.html
@@ -0,0 +1,79 @@
<div class="hts-doc-text">
This tab show your all failed recordings.

<p>
<img src="docresources/failedrecordings1.png">
</p>
<p>
<u>Buttons have the following functions:</u>

<dl>
<dt><b>Delete</b>
<dd>
If clicked delete selected failed recordings you delete recordings. Before deleted show message: Do you really want to delete the selection ? Answer Yes or No.
<p>
<dl>
<dt><b>Download</b>
<dd>
If clicked download selected failed recordings you can downloaded recordings to your disk. After clicked you ask to select path.
<p>

<br>
<br>
<p>
<u>The columns have the following functions:</u>


<dl>
<dt><b>Details</b>
<dd>
Show red status and blue icon "i". After click on icon "i" you see info about select failed recordings.
<p>
<img src="docresources/failedrecordings2.png">
<p>
<dt><b>Play</b>
<dd>
Can play selected record in web browser by VLC Plugin or other external player.
<p>
<dt><b>Title</b>
<dd>
Showing title of record.
<p>
<dt><b>Episod</b>
<dd>
Showing number episod of record.
<p>
<dt><b>Scheduled Start Time</b>
<dd>
Showing date and time when the recording was started.
<p>
<dt><b>Scheduled Stop Time</b>
<dd>
Showing date and time when the recording was stoped.
<p>
<dt><b>Duration</b>
<dd>
Showing how long it took the recording.
<p>
<dt><b>File Size</b>
<dd>
<p>
Showing size of file recording.
<dt><b>Channel Name</b>
<dd>
Showing the name of the channel from which the recording was made.
<p>
<dt><b>Creator</b>
<dd>
Showing the name of the user who created the recording.
<p>
<dt><b>Schedule Status</b>
<dd>
Showing the status info of record.
<p>
<dt><b>URL</b>
<dd>
Showing the URL of record.
<p>

</div>
10 changes: 5 additions & 5 deletions docs/html/dvrfinished.html
Expand Up @@ -25,13 +25,13 @@
<dl>
<dt><b>Details</b>
<dd>
Show status and blue icon "i". After click on icon "i" you see info about select finished recordings.
Show green status and blue icon "i". After click on icon "i" you see info about select finished recordings.
<p>
<img src="docresources/finishedrecordings2.png">
<p>
<dt><b>Play</b>
<dd>
Can play selected record in web browser by VLC Plugin
Can play selected record in web browser by VLC Plugin or other external player.
<p>
<dt><b>Title</b>
<dd>
Expand All @@ -57,17 +57,17 @@
<dd>
<p>
Showing size of file recording.
<dt><b>Channel name</b>
<dt><b>Channel Name</b>
<dd>
Showing the name of the channel from which the recording was made.
<p>
<dt><b>Creator</b>
<dd>
Showing the name of the user who created the record.
Showing the name of the user who created the recording.
<p>
<dt><b>Schedule Status</b>
<dd>
Showing the status of record.
Showing the status info of record.
<p>
<dt><b>URL</b>
<dd>
Expand Down
57 changes: 53 additions & 4 deletions src/webui/static/app/dvr.js
Expand Up @@ -189,7 +189,7 @@ tvheadend.dvr_upcoming = function(panel, index) {
selected: selected,
beforeedit: beforeedit,
help: function() {
new tvheadend.help('DVR', 'config_dvrlog.html');
new tvheadend.help('DVR-Upcoming/Current Recordings', 'dvrupcoming.html');
},
});

Expand Down Expand Up @@ -285,6 +285,30 @@ tvheadend.dvr_failed = function(panel, index) {

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_failed',
Expand All @@ -297,15 +321,40 @@ tvheadend.dvr_failed = function(panel, index) {
del: true,
list: 'disp_title,episode,start_real,stop_real,' +
'duration,channelname,creator,' +
'status,sched_status',
'status,sched_status,url',
columns: {
filesize: {
renderer: function() {
return function(v) {
if (v == null)
return '';
return parseInt(v / 1000000) + ' MB';
}
}
}
},
sort: {
field: 'start_real',
direction: 'ASC'
},
plugins: [actions],
lcol: [actions],
lcol: [
actions,
{
width: 40,
header: "Play",
renderer: function(v, o, r) {
var title = r.data['disp_title'];
if (r.data['episode'])
title += ' / ' + r.data['episode'];
return '<a href="play/dvrfile/' + r.id +
'?title=' + encodeURIComponent(title) + '">Play</a>';
}
}],
tbar: [downloadButton],
selected: selected,
help: function() {
new tvheadend.help('DVR', 'config_dvrlog.html');
new tvheadend.help('DVR-Failed Recordings', 'dvrfailed.html');
},
});

Expand Down

0 comments on commit 78cb1ba

Please sign in to comment.