Merge pull request #282 from bombsquad-community/pre_release

Update to 1.0.21
This commit is contained in:
Vishal 2024-05-21 03:32:32 +05:30 committed by GitHub
commit f55712299c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 18 additions and 7 deletions

View file

@ -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)

View file

@ -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",

View file

@ -31,7 +31,7 @@ from datetime import datetime
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.
@ -372,6 +372,9 @@ class StartupTasks:
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()
@ -381,13 +384,11 @@ class StartupTasks:
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!"