From: E.Smith <31170571+azlm8t@users.noreply.github.com> Date: Sat, 25 Nov 2017 09:38:44 +0000 (+0000) Subject: ui: Ensure 'new' is checked correctly (#4594). X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7720d2306d265cfc46a9b4b3d153314a4f9b0c75;p=thirdparty%2Ftvheadend.git ui: Ensure 'new' is checked correctly (#4594). Previously we used rec.new and that appeared to cause problems in some browsers. So now we check that new is in the record and that it is non-zero. Issue: #4594. --- diff --git a/src/webui/static/app/epg.js b/src/webui/static/app/epg.js index f07418989..ee6cd662b 100644 --- a/src/webui/static/app/epg.js +++ b/src/webui/static/app/epg.js @@ -164,7 +164,7 @@ tvheadend.epgDetails = function(event) { tags.push(_('UHDTV')); else if (event.hd > 0) tags.push(_('HDTV')); - if ('new' in event) + if ('new' in event && event.new) tags.push(_('New#EPG').split('#')[0]); if (event.repeat) tags.push(_('Repeat#EPG').split('#')[0]); diff --git a/src/webui/static/app/tvheadend.js b/src/webui/static/app/tvheadend.js index 588a89884..29699bc5f 100644 --- a/src/webui/static/app/tvheadend.js +++ b/src/webui/static/app/tvheadend.js @@ -229,7 +229,7 @@ tvheadend.getContentTypeIcons = function(rec) { } var ret = ""; - if (rec.new) + if ('new' in rec && rec.new) ret += "🆕"; // Squared New return ret + tvheadend.uniqueArray(ret_major).join("") + tvheadend.uniqueArray(ret_minor).join(""); }