summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrainDoctor <traindoctor@protonmail.com>2022-10-22 18:36:49 -0700
committerTrainDoctor <traindoctor@protonmail.com>2022-10-22 18:36:49 -0700
commitaf51a29055ca222b8324f80c84c19654eded11a4 (patch)
treefefc5026f7c2b250f51e56681477966112990b98
parentc546a818f116d3344da1a9c866555036fcb9a7cc (diff)
downloaddecky-loader-af51a29055ca222b8324f80c84c19654eded11a4.tar.gz
decky-loader-af51a29055ca222b8324f80c84c19654eded11a4.zip
Added unload hook for plugins.
-rw-r--r--backend/plugin.py9
-rw-r--r--frontend/src/store.tsx1
2 files changed, 10 insertions, 0 deletions
diff --git a/backend/plugin.py b/backend/plugin.py
index 9d9a22c6..1bf187f6 100644
--- a/backend/plugin.py
+++ b/backend/plugin.py
@@ -71,6 +71,15 @@ class PluginWrapper:
self.log.error("Failed to start " + self.name + "!\n" + format_exc())
exit(0)
+ def _unload(self):
+ try:
+ self.log.info("Attempting to unload " + self.name + "\n")
+ if hasattr(self.Plugin, "_unload"):
+ self.Plugin._unload(self.Plugin)
+ except:
+ self.log.error("Failed to unload " + self.name + "!\n" + format_exc())
+ exit(0)
+
async def _setup_socket(self):
self.socket = await start_unix_server(self._listen_for_method_call, path=self.socket_addr, limit=BUFFER_LIMIT)
diff --git a/frontend/src/store.tsx b/frontend/src/store.tsx
index 6eba807f..10c35406 100644
--- a/frontend/src/store.tsx
+++ b/frontend/src/store.tsx
@@ -14,6 +14,7 @@ export interface StorePlugin {
author: string;
description: string;
tags: string[];
+ image_url: string;
}
export interface LegacyStorePlugin {