Fixed multi file ipc load speeds
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user