Fixed multi file ipc load speeds

This commit is contained in:
2026-02-26 02:44:22 -06:00
parent e9c0565c04
commit 6225915fda
6 changed files with 33 additions and 9 deletions

View File

@@ -87,6 +87,16 @@ class IPCServer(Singleton):
conn.close()
break
if "FILES|" in msg:
import json
data = msg.split("FILES|")[1].strip()
files = json.loads(data)
if files:
event_system.emit("handle-files-from-ipc", (files,))
conn.close()
break
if "DIR|" in msg:
file = msg.split("DIR|")[1].strip()
if file:

View File

@@ -21,6 +21,12 @@ class IPCSignalsMixin:
self.broadcast_message, "handle-file", (fpath,)
)
def handle_files_from_ipc(self, uris: list) -> None:
logger.debug(f"Files From IPC: {uris}")
GLib.idle_add(
self.broadcast_message, "handle-files", (uris,)
)
def handle_dir_from_ipc(self, fpath: str) -> None:
logger.debug(f"Dir From IPC: {fpath}")
GLib.idle_add(