diff options
| author | TrainDoctor <traindoctor@protonmail.com> | 2022-10-30 10:32:05 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-30 10:32:05 -0700 |
| commit | bace5143d28c42ffcc83509b7fcdf02b6cae6934 (patch) | |
| tree | 5a39a5980a84136df5a6781ba1e200d151112073 /backend/loader.py | |
| parent | f5fc2053847d3054d36d3348d21e7de060342698 (diff) | |
| download | decky-loader-bace5143d28c42ffcc83509b7fcdf02b6cae6934.tar.gz decky-loader-bace5143d28c42ffcc83509b7fcdf02b6cae6934.zip | |
Merge Tabs and Injection Fixes, bring back native Valve toaster (#238)
* Bring back component patch-based tabshook
* better injection point
* finally fix dumb loading error
* fix QAM injection breaking after lock
* shut up typescript
* fix lock screen focusing issues
* Bring back the Valve toaster!
* Add support for stable steamos
* fix focus bug on lock screen but actually
* oops: remove extra console log
* shut up typescript again
* better fix for lockscreen bug
* better probably
* actually fix focus issues (WTF)
Co-authored-by: AAGaming <aa@mail.catvibers.me>
Diffstat (limited to 'backend/loader.py')
| -rw-r--r-- | backend/loader.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/backend/loader.py b/backend/loader.py index 8c48c7ae..e756ba5e 100644 --- a/backend/loader.py +++ b/backend/loader.py @@ -121,7 +121,7 @@ class Loader: with open(path.join(self.plugin_path, plugin.plugin_directory, "dist/index.js"), 'r') as bundle: return web.Response(text=bundle.read(), content_type="application/javascript") - def import_plugin(self, file, plugin_directory, refresh=False): + def import_plugin(self, file, plugin_directory, refresh=False, batch=False): try: plugin = PluginWrapper(file, plugin_directory, self.plugin_path) if plugin.name in self.plugins: @@ -135,7 +135,8 @@ class Loader: self.logger.info(f"Plugin {plugin.name} is passive") self.plugins[plugin.name] = plugin.start() self.logger.info(f"Loaded {plugin.name}") - self.loop.create_task(self.dispatch_plugin(plugin.name if not plugin.legacy else "$LEGACY_" + plugin.name, plugin.version)) + if not batch: + self.loop.create_task(self.dispatch_plugin(plugin.name if not plugin.legacy else "$LEGACY_" + plugin.name, plugin.version)) except Exception as e: self.logger.error(f"Could not load {file}. {e}") print_exc() @@ -150,7 +151,7 @@ class Loader: directories = [i for i in listdir(self.plugin_path) if path.isdir(path.join(self.plugin_path, i)) and path.isfile(path.join(self.plugin_path, i, "plugin.json"))] for directory in directories: self.logger.info(f"found plugin: {directory}") - self.import_plugin(path.join(self.plugin_path, directory, "main.py"), directory) + self.import_plugin(path.join(self.plugin_path, directory, "main.py"), directory, False, True) async def handle_reloads(self): while True: |
