Made searcher grep more like wrapper, addeed timestamp ignore

This commit is contained in:
2022-11-29 22:34:25 -06:00
parent f2090a7d46
commit e4e5e08cb4
6 changed files with 75 additions and 99 deletions

View File

@@ -60,14 +60,22 @@ class IPCServer:
msg = conn.recv()
if "SEARCH|" in msg:
file = msg.split("SEARCH|")[1].strip()
if file:
GLib.idle_add(self._load_file_ui, file, priority=GLib.PRIORITY_LOW)
ts, file = msg.split("SEARCH|")[1].strip().split("|", 1)
try:
timestamp = float(ts)
if timestamp > self.fsearch_time_stamp and file:
GLib.idle_add(self._load_file_ui, file, priority=GLib.PRIORITY_LOW)
except Exception as e:
...
if "GREP|" in msg:
data = msg.split("GREP|")[1].strip()
if data:
GLib.idle_add(self._load_grep_ui, data, priority=GLib.PRIORITY_LOW)
ts, data = msg.split("GREP|")[1].strip().split("|", 1)
try:
timestamp = float(ts)
if timestamp > self.grep_time_stamp and data:
GLib.idle_add(self._load_grep_ui, data, priority=GLib.PRIORITY_LOW)
except Exception as e:
...
conn.close()