]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
WEBUI: Cosmetic change, add PLAY and DOWNLOAD button to Failed Recordings
authorPiotr Kuchciak <piotr.kuchciak@gmail.com>
Tue, 14 Oct 2014 11:07:07 +0000 (13:07 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 14 Oct 2014 12:12:53 +0000 (14:12 +0200)
docs/html/dvrfailed.html [new file with mode: 0644]
docs/html/dvrfinished.html
src/webui/static/app/dvr.js

diff --git a/docs/html/dvrfailed.html b/docs/html/dvrfailed.html
new file mode 100644 (file)
index 0000000..c102a12
--- /dev/null
@@ -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>
index 12da3cb264d3093086e9a7a1ba628e5cd6d4f81e..a3ef3c10091ec8202ebade6d51212cae8b4887c3 100644 (file)
@@ -25,13 +25,13 @@ This tab show your all finished recordings.
  <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>
@@ -57,17 +57,17 @@ This tab show your all finished recordings.
   <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>
index 7f8dec38568072bf7783e716e33d74449b2f2e30..405bbca9a1502d5993e18d18b516740940c63d30 100644 (file)
@@ -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');
         },
     });
 
@@ -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',
@@ -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');
         },
     });