Add Plugin.uninstall callback support (#555)

* Add Plugin.uninstall callback support

https://github.com/SteamDeckHomebrew/decky-loader/issues/536

* Remove empty deck.sh
This commit is contained in:
Wayne Heaney
2024-03-13 15:59:22 -07:00
committed by AAGaming
parent 6b06bae250
commit a1a29616e5
3 changed files with 23 additions and 6 deletions
+2 -2
View File
@@ -97,9 +97,9 @@ class PluginWrapper:
self._listener_task = create_task(self._response_listener())
return self
def stop(self):
def stop(self, uninstall: bool = False):
self._listener_task.cancel()
async def _(self: PluginWrapper):
await self._socket.write_single_line(dumps({ "stop": True }, ensure_ascii=False))
await self._socket.write_single_line(dumps({ "stop": True, "uninstall": uninstall }, ensure_ascii=False))
await self._socket.close_socket_connection()
create_task(_(self))