mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-10-08 14:54:36 +00:00
Fixing an error in notifications of new plugins.
This commit is contained in:
parent
94462e9b9b
commit
77963f04a2
1 changed files with 4 additions and 3 deletions
|
|
@ -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,11 +384,9 @@ 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
|
||||
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])
|
||||
))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue