]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
ui: Ensure 'new' is checked correctly (#4594).
authorE.Smith <31170571+azlm8t@users.noreply.github.com>
Sat, 25 Nov 2017 09:38:44 +0000 (09:38 +0000)
committerJaroslav Kysela <perex@perex.cz>
Mon, 27 Nov 2017 11:56:32 +0000 (12:56 +0100)
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.

src/webui/static/app/epg.js
src/webui/static/app/tvheadend.js

index f0741898988deebbbfe1cc603efe11d385d88ef9..ee6cd662b5df5df2aa1e9ae6622034ff721e16c8 100644 (file)
@@ -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]);
index 588a898840cc3370936f2e42d122f5fd47ba4add..29699bc5f698ca2079d70c36fc6df1847767ee3a 100644 (file)
@@ -229,7 +229,7 @@ tvheadend.getContentTypeIcons = function(rec) {
   }
 
   var ret = "";
-  if (rec.new)
+  if ('new' in rec && rec.new)
     ret += "&#x1f195;";         // Squared New
   return ret + tvheadend.uniqueArray(ret_major).join("") + tvheadend.uniqueArray(ret_minor).join("");
 }