Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 1.0.21 #282

Merged
merged 6 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
## Plugin Manager (dd-mm-yyyy)

### 1.0.21 (20-05-2024)

- Fixed an error related with notification of new plugins.

### 1.0.20 (13-05-2024)

- Now compatible with BS version 1.7.35+.
- Updated build_number and version attributes to latest.
- FIX: Changelog for all version was shown after refreshing
- FIX: Changelog for all version was shown after refreshing.

### 1.0.19 (05-05-2024)

Expand Down
6 changes: 6 additions & 0 deletions index.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py",
"versions": {
"1.0.21:": {
"api_version": 8,
"commit_sha": "b1a3aaa",
"released_on": "20-05-2024",
"md5sum": "e00d6ce92ce4651eceb5ae389ca5c4fb"
},
"1.0.20": {
"api_version": 8,
"commit_sha": "5ce10ce",
Expand Down
13 changes: 7 additions & 6 deletions plugin_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from threading import Thread
import logging

PLUGIN_MANAGER_VERSION = "1.0.20"
PLUGIN_MANAGER_VERSION = "1.0.21"
REPOSITORY_URL = "https://github.com/bombsquad-community/plugin-manager"
# Current tag can be changed to "staging" or any other branch in
# plugin manager repo for testing purpose.
Expand Down Expand Up @@ -372,6 +372,9 @@ async def notify_new_plugins(self):
babase.app.config.commit()
return

def title_it(plug):
plug = str(plug).replace('_', ' ').title()
return plug
if existing_num_of_plugins < new_num_of_plugins:
new_plugin_count = new_num_of_plugins - existing_num_of_plugins
all_plugins = await self.plugin_manager.categories["All"].get_plugins()
Expand All @@ -381,13 +384,11 @@ async def notify_new_plugins(self):
reverse=True,
)
new_supported_plugins = new_supported_plugins[:new_plugin_count]
new_supported_plugins = [plug.replace('_', ' ').title()
for plug in new_supported_plugins]
new_supported_plugins_count = len(new_supported_plugins)
if new_supported_plugins_count > 0:
new_supported_plugins = ", ".join(map(str, (new_supported_plugins
if new_supported_plugins_count <= show_max_names else
new_supported_plugins[0:show_max_names])
new_supported_plugins = ", ".join(map(title_it, (new_supported_plugins
if new_supported_plugins_count <= show_max_names else
new_supported_plugins[0:show_max_names])
))
if new_supported_plugins_count == 1:
notification_text = f"{new_supported_plugins_count} new plugin ({new_supported_plugins}) is available!"
Expand Down