mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-11-07 17:36:00 +00:00
updated the screenmessage for new plugins
Prints only a single message depending on number of plugins.
This commit is contained in:
parent
1d9f6e16fe
commit
b48119bd36
2 changed files with 5 additions and 8 deletions
|
|
@ -1,12 +1,7 @@
|
||||||
{
|
{
|
||||||
"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": {
|
||||||
"0.3.3": {
|
"0.3.3": null,
|
||||||
"api_version": 7,
|
|
||||||
"commit_sha": "54614de",
|
|
||||||
"released_on": "13-05-2023",
|
|
||||||
"md5sum": "d55a413b6b2e6b8f15ad3523b224f164"
|
|
||||||
},
|
|
||||||
"0.3.2": {
|
"0.3.2": {
|
||||||
"api_version": 7,
|
"api_version": 7,
|
||||||
"commit_sha": "789f95f",
|
"commit_sha": "789f95f",
|
||||||
|
|
|
||||||
|
|
@ -296,7 +296,10 @@ class StartupTasks:
|
||||||
new_plugin_count = len(valid_new_plugins)
|
new_plugin_count = len(valid_new_plugins)
|
||||||
if new_plugin_count:
|
if new_plugin_count:
|
||||||
valid_new_plugins = ', '.join(valid_new_plugins)
|
valid_new_plugins = ', '.join(valid_new_plugins)
|
||||||
print_message = f"{new_plugin_count} new plugins ({valid_new_plugins}) are available!"
|
if new_plugin_count == 1:
|
||||||
|
print_message = f"{new_plugin_count} new plugin ({valid_new_plugins}) is available!"
|
||||||
|
else:
|
||||||
|
print_message = f"{new_plugin_count} new plugins ({valid_new_plugins}) are available!"
|
||||||
ba.screenmessage(print_message, color=(0, 1, 0))
|
ba.screenmessage(print_message, color=(0, 1, 0))
|
||||||
|
|
||||||
async def notify_new_plugins(self):
|
async def notify_new_plugins(self):
|
||||||
|
|
@ -315,7 +318,6 @@ class StartupTasks:
|
||||||
new_num_of_plugins = len(await self.plugin_manager.categories["All"].get_plugins())
|
new_num_of_plugins = len(await self.plugin_manager.categories["All"].get_plugins())
|
||||||
|
|
||||||
if num_of_plugins < new_num_of_plugins:
|
if num_of_plugins < new_num_of_plugins:
|
||||||
ba.screenmessage("We got new Plugins for you to try!")
|
|
||||||
await self.get_new_plugins(new_num_of_plugins-num_of_plugins)
|
await self.get_new_plugins(new_num_of_plugins-num_of_plugins)
|
||||||
ba.app.config["Community Plugin Manager"]["Existing Number of Plugins"] = new_num_of_plugins
|
ba.app.config["Community Plugin Manager"]["Existing Number of Plugins"] = new_num_of_plugins
|
||||||
ba.app.config.commit()
|
ba.app.config.commit()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue