From e16f5ecad04b00cf328564648bd7a6dc9847c8fe Mon Sep 17 00:00:00 2001 From: "E.Smith" <31170571+azlm8t@users.noreply.github.com> Date: Tue, 26 Sep 2017 14:56:55 +0100 Subject: [PATCH] webui: Render upcoming recording duplicates with a line-through in grid. (#4632) The advanced and expert views on the upcoming tab have a column for the duplicate date. But on the basic view there is no indication of duplicates unless you click information on the entry. So we now render duplicates with a line-through. This makes it clear they are duplicates that will not be recorded. Issue: #4632 --- src/webui/static/app/dvr.js | 21 +++++++++++++++++++++ src/webui/static/app/ext.css | 4 ++++ 2 files changed, 25 insertions(+) diff --git a/src/webui/static/app/dvr.js b/src/webui/static/app/dvr.js index f6e7881a8..c9838e521 100644 --- a/src/webui/static/app/dvr.js +++ b/src/webui/static/app/dvr.js @@ -195,6 +195,21 @@ tvheadend.filesizeRenderer = function(st) { } } +/** Render an entry differently if it is a duplicate */ +tvheadend.displayWithDuplicateRenderer = function(value, meta, record) { + return function() { + return function(value, meta, record) { + if (value == null) + return ''; + var is_dup = record.data['duplicate']; + if (is_dup) + return "" + value + ""; + else + return value; + } + } +} + /** * */ @@ -305,6 +320,12 @@ tvheadend.dvr_upcoming = function(panel, index) { 'start_real,stop_real,duration,pri,filesize,' + 'sched_status,errors,data_errors,config_name,owner,creator,comment', columns: { + disp_title: { + renderer: tvheadend.displayWithDuplicateRenderer() + }, + disp_subtitle: { + renderer: tvheadend.displayWithDuplicateRenderer() + }, filesize: { renderer: tvheadend.filesizeRenderer() } diff --git a/src/webui/static/app/ext.css b/src/webui/static/app/ext.css index 56eee7968..15ed817b3 100644 --- a/src/webui/static/app/ext.css +++ b/src/webui/static/app/ext.css @@ -749,6 +749,10 @@ margin-left: 5px; } +.x-epg-duplicate { + text-decoration: line-through; +} + .tv-video-player { margin-right: auto; margin-left : auto; -- 2.47.3