From d774953f6b1d775ddf31c7ae5bd6cc5e5787d108 Mon Sep 17 00:00:00 2001 From: Jongsung Kim Date: Tue, 20 Nov 2018 17:36:10 +0900 Subject: [PATCH] webui: epg: fix compatibility issue for FreeBSD 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 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/webui/static/app/epg.js b/src/webui/static/app/epg.js index 57a14aa88..193a08285 100644 --- a/src/webui/static/app/epg.js +++ b/src/webui/static/app/epg.js @@ -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(); } -- 2.47.3