summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Wiens <github@psifertex.com>2026-05-27 14:53:26 -0400
committerJordan Wiens <github@psifertex.com>2026-05-27 14:53:26 -0400
commitf2ae12d97604da6136b26c184eb7fe30531b4d5e (patch)
tree2470e9ba7764ca3530dac806e4a8d2f6d21f38ba
parent27f966a3b7a3c618a7d7d2549a4f3021f4d8d46e (diff)
fix python plugin install api to default to latest version
-rw-r--r--python/pluginmanager.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/python/pluginmanager.py b/python/pluginmanager.py
index 64d58e69..8ce1ac59 100644
--- a/python/pluginmanager.py
+++ b/python/pluginmanager.py
@@ -90,8 +90,10 @@ class Extension:
return core.BNPluginIsInstalled(self.handle)
def install(self, version_id=None) -> bool:
- """Attempt to install the given plugin"""
+ """Attempt to install the given plugin. Defaults to the latest available version."""
self.install_dependencies()
+ if version_id is None:
+ version_id = self.current_version.id
return core.BNPluginInstall(self.handle, version_id)
def uninstall(self) -> bool:
@@ -101,8 +103,7 @@ class Extension:
@installed.setter
def installed(self, state: bool):
if state:
- self.install_dependencies()
- core.BNPluginInstall(self.handle, None)
+ self.install()
else:
core.BNPluginUninstall(self.handle)