mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-11-07 17:36:00 +00:00
Merge pull request #273 from bombsquad-community/pre_release
release 1.0.19
This commit is contained in:
commit
9032cb78b1
4 changed files with 38 additions and 13 deletions
|
|
@ -1,5 +1,10 @@
|
||||||
## Plugin Manager (dd-mm-yyyy)
|
## Plugin Manager (dd-mm-yyyy)
|
||||||
|
|
||||||
|
### 1.0.19 (05-05-2024)
|
||||||
|
|
||||||
|
- Fixed an issue where changelogs were not displayed.
|
||||||
|
- Changed the Authors text color to be seen more easily.
|
||||||
|
|
||||||
### 1.0.18 (28-04-2024)
|
### 1.0.18 (28-04-2024)
|
||||||
|
|
||||||
- Fixed errors which were caused due to no internet connection.
|
- Fixed errors which were caused due to no internet connection.
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ README here.
|
||||||
|
|
||||||
-------------------------------
|
-------------------------------
|
||||||
|
|
||||||
# plugin-manager
|
# Plugin-Manager
|
||||||
|
|
||||||
A plugin manager for the game - [Bombsquad](https://www.froemling.net/apps/bombsquad). Plugin manager is a plugin in itself,
|
A plugin manager for the game - [Bombsquad](https://www.froemling.net/apps/bombsquad). Plugin manager is a plugin in itself,
|
||||||
which makes further modding of your game more convenient by providing easier access to community created content.
|
which makes further modding of your game more convenient by providing easier access to community created content.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,12 @@
|
||||||
{
|
{
|
||||||
"plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py",
|
"plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py",
|
||||||
"versions": {
|
"versions": {
|
||||||
|
"1.0.19": {
|
||||||
|
"api_version": 8,
|
||||||
|
"commit_sha": "b439c4b",
|
||||||
|
"released_on": "05-05-2024",
|
||||||
|
"md5sum": "5cc29a6d7eaafe883e63cd6f0e9153f4"
|
||||||
|
},
|
||||||
"1.0.18": {
|
"1.0.18": {
|
||||||
"api_version": 8,
|
"api_version": 8,
|
||||||
"commit_sha": "5af504e",
|
"commit_sha": "5af504e",
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ from datetime import datetime
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
PLUGIN_MANAGER_VERSION = "1.0.18"
|
PLUGIN_MANAGER_VERSION = "1.0.19"
|
||||||
REPOSITORY_URL = "https://github.com/bombsquad-community/plugin-manager"
|
REPOSITORY_URL = "https://github.com/bombsquad-community/plugin-manager"
|
||||||
# Current tag can be changed to "staging" or any other branch in
|
# Current tag can be changed to "staging" or any other branch in
|
||||||
# plugin manager repo for testing purpose.
|
# plugin manager repo for testing purpose.
|
||||||
|
|
@ -1113,7 +1113,7 @@ class PluginWindow(popup.PopupWindow):
|
||||||
v_align='center',
|
v_align='center',
|
||||||
text=text,
|
text=text,
|
||||||
scale=text_scale * 0.8,
|
scale=text_scale * 0.8,
|
||||||
color=(0.45, 0.36, 0.46),
|
color=(0.75, 0.7, 0.8),
|
||||||
maxwidth=width * 0.9,
|
maxwidth=width * 0.9,
|
||||||
draw_controller=author_text_control_btn,
|
draw_controller=author_text_control_btn,
|
||||||
)
|
)
|
||||||
|
|
@ -1386,6 +1386,7 @@ class PluginManager:
|
||||||
self._index_setup_in_progress = False
|
self._index_setup_in_progress = False
|
||||||
|
|
||||||
async def get_changelog(self) -> str:
|
async def get_changelog(self) -> str:
|
||||||
|
requested = False
|
||||||
if not self._changelog:
|
if not self._changelog:
|
||||||
request = urllib.request.Request(CHANGELOG_META.format(
|
request = urllib.request.Request(CHANGELOG_META.format(
|
||||||
repository_url=REPOSITORY_URL,
|
repository_url=REPOSITORY_URL,
|
||||||
|
|
@ -1395,7 +1396,8 @@ class PluginManager:
|
||||||
headers=self.request_headers)
|
headers=self.request_headers)
|
||||||
response = await async_send_network_request(request)
|
response = await async_send_network_request(request)
|
||||||
self._changelog = response.read().decode()
|
self._changelog = response.read().decode()
|
||||||
return self._changelog
|
requested = True
|
||||||
|
return [self._changelog, requested]
|
||||||
|
|
||||||
async def setup_changelog(self, version=None) -> None:
|
async def setup_changelog(self, version=None) -> None:
|
||||||
if version is None:
|
if version is None:
|
||||||
|
|
@ -1407,12 +1409,15 @@ class PluginManager:
|
||||||
self._changelog_setup_in_progress = not bool(self._changelog)
|
self._changelog_setup_in_progress = not bool(self._changelog)
|
||||||
try:
|
try:
|
||||||
full_changelog = await self.get_changelog()
|
full_changelog = await self.get_changelog()
|
||||||
pattern = rf"### {version} \(\d\d-\d\d-\d{{4}}\)\n(.*?)(?=### \d+\.\d+\.\d+|\Z)"
|
if full_changelog[1]:
|
||||||
matches = re.findall(pattern, full_changelog, re.DOTALL)
|
pattern = rf"### {version} \(\d\d-\d\d-\d{{4}}\)\n(.*?)(?=### \d+\.\d+\.\d+|\Z)"
|
||||||
if matches:
|
matches = re.findall(pattern, full_changelog[0], re.DOTALL)
|
||||||
changelog = matches[0].strip()
|
if matches:
|
||||||
|
changelog = matches[0].strip()
|
||||||
|
else:
|
||||||
|
changelog = f"Changelog entry for version {version} not found."
|
||||||
else:
|
else:
|
||||||
changelog = f"Changelog entry for version {version} not found."
|
changelog = full_changelog[0]
|
||||||
except urllib.error.URLError:
|
except urllib.error.URLError:
|
||||||
changelog = 'Could not get ChangeLog due to Internet Issues.'
|
changelog = 'Could not get ChangeLog due to Internet Issues.'
|
||||||
self.set_changelog_global_cache(changelog)
|
self.set_changelog_global_cache(changelog)
|
||||||
|
|
@ -1470,6 +1475,7 @@ class PluginManager:
|
||||||
def unset_index_global_cache(self):
|
def unset_index_global_cache(self):
|
||||||
try:
|
try:
|
||||||
del _CACHE["index"]
|
del _CACHE["index"]
|
||||||
|
del _CACHE["changelog"]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
@ -1926,9 +1932,11 @@ class PluginManagerWindow(bui.Window):
|
||||||
label=('Z - A' if self.selected_alphabet_order == 'z_a' else 'A - Z')
|
label=('Z - A' if self.selected_alphabet_order == 'z_a' else 'A - Z')
|
||||||
)
|
)
|
||||||
filter_text = bui.textwidget(parent=self._root_widget, query=self._filter_widget)
|
filter_text = bui.textwidget(parent=self._root_widget, query=self._filter_widget)
|
||||||
await self.draw_plugin_names(
|
if self.plugin_manager.categories != {}:
|
||||||
self.selected_category, search_term=filter_text, refresh=True, order=self.selected_alphabet_order
|
if self.plugin_manager.categories['All'] is not None:
|
||||||
)
|
await self.draw_plugin_names(
|
||||||
|
self.selected_category, search_term=filter_text, refresh=True, order=self.selected_alphabet_order
|
||||||
|
)
|
||||||
|
|
||||||
def draw_search_bar(self):
|
def draw_search_bar(self):
|
||||||
search_bar_pos_x = (85 if _uiscale is babase.UIScale.SMALL else
|
search_bar_pos_x = (85 if _uiscale is babase.UIScale.SMALL else
|
||||||
|
|
@ -2078,7 +2086,13 @@ class PluginManagerWindow(bui.Window):
|
||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
category_plugins = await self.plugin_manager.categories[category if category != 'Installed' else 'All'].get_plugins()
|
if self.plugin_manager.categories != {}:
|
||||||
|
if self.plugin_manager.categories['All'] is not None:
|
||||||
|
category_plugins = await self.plugin_manager.categories[category if category != 'Installed' else 'All'].get_plugins()
|
||||||
|
else:
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
return
|
||||||
except (KeyError, AttributeError):
|
except (KeyError, AttributeError):
|
||||||
no_internet_text = "Make sure you are connected\n to the Internet and try again."
|
no_internet_text = "Make sure you are connected\n to the Internet and try again."
|
||||||
if bui.textwidget(query=self._plugin_manager_status_text) != no_internet_text:
|
if bui.textwidget(query=self._plugin_manager_status_text) != no_internet_text:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue