There was an error while loading. Please reload this page.
1 parent 27f966a commit f2ae12dCopy full SHA for f2ae12d
1 file changed
python/pluginmanager.py
@@ -90,8 +90,10 @@ def installed(self) -> bool:
90
return core.BNPluginIsInstalled(self.handle)
91
92
def install(self, version_id=None) -> bool:
93
- """Attempt to install the given plugin"""
+ """Attempt to install the given plugin. Defaults to the latest available version."""
94
self.install_dependencies()
95
+ if version_id is None:
96
+ version_id = self.current_version.id
97
return core.BNPluginInstall(self.handle, version_id)
98
99
def uninstall(self) -> bool:
@@ -101,8 +103,7 @@ def uninstall(self) -> bool:
101
103
@installed.setter
102
104
def installed(self, state: bool):
105
if state:
- self.install_dependencies()
- core.BNPluginInstall(self.handle, None)
106
+ self.install()
107
else:
108
core.BNPluginUninstall(self.handle)
109
0 commit comments