mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-06-13 17:13:45 +03:00
- The Loader now watches for file changes in the plugin directory, and will (re)import when a new plugin is created, or an existing one is modified. This is implemented by means of the watchdog library - Plugin classes are now instantiated (and therefore require a self arg in every method). This way they can maintain a state during the runtime of the loader (or until they are reloaded), and share data between methods. - Plugins can now have a __main() method, which can include long-running code. Every plugin's main method is ran in a separate asyncio task. - Plugin methods that start from __ are now uncallable from javascript. This can be helpful when implementing unfinished/development versions of methods.
19 lines
350 B
Python
19 lines
350 B
Python
class Plugin:
|
|
name = "Template Plugin"
|
|
|
|
author = "SteamDeckHomebrew"
|
|
|
|
main_view_html = "<html><body><h3>Template Plugin</h3></body></html>"
|
|
|
|
tile_view_html = ""
|
|
|
|
hot_reload = False
|
|
|
|
async def __main(self):
|
|
pass
|
|
|
|
async def method_1(self, **kwargs):
|
|
pass
|
|
|
|
async def method_2(self, **kwargs):
|
|
pass |