]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
webui: epg: fix compatibility issue for FreeBSD
authorJongsung Kim <jongsung.kim@gmail.com>
Tue, 20 Nov 2018 08:36:10 +0000 (17:36 +0900)
committerJaroslav Kysela <perex@perex.cz>
Fri, 23 Nov 2018 12:45:11 +0000 (13:45 +0100)
The EPG screen serviced by FreeBSD port of tvheadend has two abnormal control
behaviors:

    Reset All button makes the list empty
    Typing and then deleting any search string also makes the list empty.

This patch fixes the symptoms above.

Patch tested with the latest FreeBSD port of tvheadend-4.2.7.

Changes since v1:
- call reset only if required

src/webui/static/app/epg.js

index 57a14aa88cd5c8dcf5b8dab58b0eb6c4a06dd090..193a08285e3fe0570a9196b38fe0e9414476f739 100644 (file)
@@ -1166,10 +1166,11 @@ tvheadend.epg = function() {
     epgFilterTitle.on('valid', function(c) {
         var value = c.getValue();
 
-        if (value.length < 1)
-            value = null;
-
-        if (epgStore.baseParams.title !== value) {
+        if (value.length < 1) {
+            delete epgStore.baseParams.title;
+            epgView.reset();
+        }
+        else if (epgStore.baseParams.title !== value) {
             epgStore.baseParams.title = value;
             epgView.reset();
         }