mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-06-13 09:03:20 +03:00
fix static/lang file fetch and method call
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -26,4 +26,4 @@ class MethodCallRequest:
|
||||
await self.event.wait()
|
||||
if not self.response.success:
|
||||
raise Exception(self.response.result)
|
||||
return self.response
|
||||
return self.response.result
|
||||
Reference in New Issue
Block a user