diff options
| author | AAGaming <aagaming@riseup.net> | 2024-02-21 01:08:25 -0500 |
|---|---|---|
| committer | AAGaming <aagaming@riseup.net> | 2024-02-21 01:08:25 -0500 |
| commit | 6d2e9365c0fb1bea804743245d79a5b97e3af108 (patch) | |
| tree | d34d09b7406d065edc79ff4a6c694f5caee923f0 /backend/decky_loader/plugin/plugin.py | |
| parent | 61cf80f8a2d472e9cbc7d401c7cd24075d5bcf28 (diff) | |
| download | decky-loader-6d2e9365c0fb1bea804743245d79a5b97e3af108.tar.gz decky-loader-6d2e9365c0fb1bea804743245d79a5b97e3af108.zip | |
more major websocket progress
Diffstat (limited to 'backend/decky_loader/plugin/plugin.py')
| -rw-r--r-- | backend/decky_loader/plugin/plugin.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/backend/decky_loader/plugin/plugin.py b/backend/decky_loader/plugin/plugin.py index 47d3d7b0..cad323f4 100644 --- a/backend/decky_loader/plugin/plugin.py +++ b/backend/decky_loader/plugin/plugin.py @@ -4,9 +4,9 @@ from logging import getLogger from os import path from multiprocessing import Process - from .sandboxed_plugin import SandboxedPlugin from .messages import MethodCallRequest, SocketMessageType +from ..enums import PluginLoadType from ..localplatform.localsocket import LocalSocket from typing import Any, Callable, Coroutine, Dict, List @@ -21,10 +21,14 @@ class PluginWrapper: self.version = None + self.load_type = PluginLoadType.LEGACY_EVAL_IIFE.value + json = load(open(path.join(plugin_path, plugin_directory, "plugin.json"), "r", encoding="utf-8")) if path.isfile(path.join(plugin_path, plugin_directory, "package.json")): package_json = load(open(path.join(plugin_path, plugin_directory, "package.json"), "r", encoding="utf-8")) self.version = package_json["version"] + if ("type" in package_json and package_json["type"] == "module"): + self.load_type = PluginLoadType.ESMODULE_V1.value self.name = json["name"] self.author = json["author"] |
