summaryrefslogtreecommitdiff
path: root/backend/src/loader.py
diff options
context:
space:
mode:
Diffstat (limited to 'backend/src/loader.py')
-rw-r--r--backend/src/loader.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/backend/src/loader.py b/backend/src/loader.py
index 49f80c64..162cf498 100644
--- a/backend/src/loader.py
+++ b/backend/src/loader.py
@@ -102,13 +102,12 @@ class Loader:
self.watcher.disabled = False
async def handle_frontend_assets(self, request: web.Request):
- file = path.join(path.dirname(__file__), "..", "static", request.match_info["path"])
-
+ file = Path(__file__).parents[1].joinpath("static").joinpath(request.match_info["path"])
return web.FileResponse(file, headers={"Cache-Control": "no-cache"})
async def handle_frontend_locales(self, request: web.Request):
req_lang = request.match_info["path"]
- file = path.join(path.dirname(__file__), "..", "locales", req_lang)
+ file = Path(__file__).parents[1].joinpath("locales").joinpath(req_lang)
if exists(file):
return web.FileResponse(file, headers={"Cache-Control": "no-cache", "Content-Type": "application/json"})
else:
@@ -143,7 +142,7 @@ class Loader:
self.plugins.pop(plugin.name, None)
if plugin.passive:
self.logger.info(f"Plugin {plugin.name} is passive")
- self.plugins[plugin.name] = plugin
+ self.plugins[plugin.name] = plugin.start()
self.logger.info(f"Loaded {plugin.name}")
if not batch:
self.loop.create_task(self.dispatch_plugin(plugin.name, plugin.version))