mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-11-07 17:36:00 +00:00
Set the view_url to the current latest compatible version
This commit is contained in:
parent
f725ec06e3
commit
99efaeb293
1 changed files with 8 additions and 1 deletions
|
|
@ -552,7 +552,6 @@ class Plugin:
|
||||||
tag = CURRENT_TAG
|
tag = CURRENT_TAG
|
||||||
self.url = url
|
self.url = url
|
||||||
self.download_url = url.format(content_type="raw", tag=tag)
|
self.download_url = url.format(content_type="raw", tag=tag)
|
||||||
self.view_url = url.format(content_type="blob", tag=tag)
|
|
||||||
self._local_plugin = None
|
self._local_plugin = None
|
||||||
|
|
||||||
self._versions = None
|
self._versions = None
|
||||||
|
|
@ -562,6 +561,14 @@ class Plugin:
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return f"<Plugin({self.name})>"
|
return f"<Plugin({self.name})>"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def view_url(self):
|
||||||
|
if self.latest_compatible_version == self.latest_version:
|
||||||
|
tag = CURRENT_TAG
|
||||||
|
else:
|
||||||
|
tag = self.latest_compatible_version.commit_sha
|
||||||
|
return self.url.format(content_type="blob", tag=tag)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_installed(self):
|
def is_installed(self):
|
||||||
return os.path.isfile(self.install_path)
|
return os.path.isfile(self.install_path)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue