]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
ui: Don't display subtitle if it is same as summary. (#4594).
authorE.Smith <31170571+azlm8t@users.noreply.github.com>
Wed, 22 Nov 2017 10:54:03 +0000 (10:54 +0000)
committerJaroslav Kysela <perex@perex.cz>
Thu, 23 Nov 2017 08:00:38 +0000 (09:00 +0100)
Some OTA don't have a separate sub-title and description/summary
so if they are the same then don't display it as a sub-title since
the description is often long.

Issue: #4594.

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

index 2bacdb20f73e3795baa8085a526ecfb14432eb2e..a6b38505903996f77aaca435e1717712d09410dd 100644 (file)
@@ -53,7 +53,7 @@ tvheadend.dvrDetails = function(uuid) {
             displayTitle += "&nbsp;(" + copyright_year + ")";
         if (title)
             content += '<div class="x-epg-title">' + displayTitle + '</div>';
-        if (subtitle)
+        if (subtitle && (!desc || (desc && subtitle != desc)))
             content += '<div class="x-epg-title">' + subtitle + '</div>';
         if (episode)
             content += '<div class="x-epg-title">' + episode + '</div>';
index 5b39ba9f23e5e60e398c1b622651b6ffdacb89f3..f0741898988deebbbfe1cc603efe11d385d88ef9 100644 (file)
@@ -107,7 +107,9 @@ tvheadend.epgDetails = function(event) {
     if (icons)
         content += '<div class="x-epg-icons">' + icons + '</div>';
     content += '<div class="x-epg-title">' + event.title;
-    if (event.subtitle)
+    // Some OTA have the same subtitle and summary so don't display subtitle
+    // since summary can be long.
+    if (event.subtitle && (!event.summary || (event.summary && event.subtitle != event.summary)))
         content += "&nbsp;:&nbsp;" + event.subtitle;
     if (event.copyright_year)
         content += "&nbsp;(" + event.copyright_year + ")";