From f9ff518e6d6368f65ead7634f459498b183081f2 Mon Sep 17 00:00:00 2001 From: Party Wumpus <48649272+PartyWumpus@users.noreply.github.com> Date: Tue, 9 Apr 2024 15:44:38 +0100 Subject: attempt to add plugin events to the plugin frontend api. unable to test right now though --- backend/decky_loader/plugin/sandboxed_plugin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'backend/decky_loader/plugin/sandboxed_plugin.py') diff --git a/backend/decky_loader/plugin/sandboxed_plugin.py b/backend/decky_loader/plugin/sandboxed_plugin.py index b49dcf41..98706a33 100644 --- a/backend/decky_loader/plugin/sandboxed_plugin.py +++ b/backend/decky_loader/plugin/sandboxed_plugin.py @@ -14,7 +14,7 @@ from ..localplatform.localplatform import setgid, setuid, get_username, get_home from ..enums import UserType from .. import helpers -from typing import List, TypeVar, Type +from typing import List, TypeVar, Any DataType = TypeVar("DataType") @@ -83,11 +83,11 @@ class SandboxedPlugin: sysmodules[key.replace("decky_loader.", "")] = sysmodules[key] from .imports import decky - async def emit(event: str, data: DataType | None = None, data_type: Type[DataType] | None = None) -> None: + async def emit(event: str, *args: Any) -> None: await self._socket.write_single_line_server(dumps({ "type": SocketMessageType.EVENT, "event": event, - "data": data + "args": args })) # copy the docstring over so we don't have to duplicate it emit.__doc__ = decky.emit.__doc__ -- cgit v1.2.3