From 84514438b4d6690015103e463c804df7f0faf87b Mon Sep 17 00:00:00 2001 From: Vishal Date: Sat, 20 Apr 2024 23:53:59 +0530 Subject: [PATCH 1/4] Limited the "new plugins available" screen message to maximum 3 plugins. --- index.json | 1 + plugin_manager.py | 14 ++++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/index.json b/index.json index 1a73d5c..c18ec76 100644 --- a/index.json +++ b/index.json @@ -1,6 +1,7 @@ { "plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py", "versions": { + "1.0.12": null, "1.0.11": { "api_version": 8, "commit_sha": "4228b3e", diff --git a/plugin_manager.py b/plugin_manager.py index 3bde6b4..5722ac2 100644 --- a/plugin_manager.py +++ b/plugin_manager.py @@ -32,7 +32,7 @@ from threading import Thread import logging -PLUGIN_MANAGER_VERSION = "1.0.11" +PLUGIN_MANAGER_VERSION = "1.0.12" 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. @@ -375,13 +375,18 @@ 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(str, (new_supported_plugins + if new_supported_plugins_count < 4 else + new_supported_plugins[0:3]) + )) if new_supported_plugins_count == 1: notification_text = f"{new_supported_plugins_count} new plugin ({new_supported_plugins}) is available!" else: - notification_text = f"{new_supported_plugins_count} new plugins ({new_supported_plugins}) are available!" + notification_text = (f"{new_supported_plugins_count} new plugins " + + f"({new_supported_plugins + (', etc' if new_supported_plugins_count > 3 else '')}) are available!") bui.screenmessage(notification_text, color=(0, 1, 0)) if existing_num_of_plugins != new_num_of_plugins: @@ -940,7 +945,8 @@ class PluginWindow(popup.PopupWindow): scale_origin_stack_offset=self.scale_origin) pos = height * 0.8 - plugin_title = f"{self.plugin.name} (v{self.plugin.latest_compatible_version.number})" + plug_name = self.plugin.name.replace('_', ' ').title() + plugin_title = f"{plug_name} (v{self.plugin.latest_compatible_version.number})" bui.textwidget(parent=self._root_widget, position=(width * 0.49, pos), size=(0, 0), h_align='center', v_align='center', text=plugin_title, From 34bbcba187379ded0c460d6bad8c56104a7aa111 Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Sat, 20 Apr 2024 18:24:27 +0000 Subject: [PATCH 2/4] [ci] auto-format --- plugin_manager.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugin_manager.py b/plugin_manager.py index 5722ac2..a020c9a 100644 --- a/plugin_manager.py +++ b/plugin_manager.py @@ -375,18 +375,19 @@ 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 = [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(str, (new_supported_plugins if new_supported_plugins_count < 4 else new_supported_plugins[0:3]) )) if new_supported_plugins_count == 1: notification_text = f"{new_supported_plugins_count} new plugin ({new_supported_plugins}) is available!" else: - notification_text = (f"{new_supported_plugins_count} new plugins " + - f"({new_supported_plugins + (', etc' if new_supported_plugins_count > 3 else '')}) are available!") + notification_text = (f"{new_supported_plugins_count} new plugins " + + f"({new_supported_plugins + (', etc' if new_supported_plugins_count > 3 else '')}) are available!") bui.screenmessage(notification_text, color=(0, 1, 0)) if existing_num_of_plugins != new_num_of_plugins: From b73aa25121130e0678d8aecfff5fcefbc921499e Mon Sep 17 00:00:00 2001 From: vishal332008 Date: Sat, 20 Apr 2024 18:24:28 +0000 Subject: [PATCH 3/4] [ci] apply-version-metadata --- index.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.json b/index.json index c18ec76..f523b6c 100644 --- a/index.json +++ b/index.json @@ -1,7 +1,12 @@ { "plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py", "versions": { - "1.0.12": null, + "1.0.12": { + "api_version": 8, + "commit_sha": "34bbcba", + "released_on": "20-04-2024", + "md5sum": "6d14d091d02582270c5c93b54d65efd5" + }, "1.0.11": { "api_version": 8, "commit_sha": "4228b3e", From c783c42b0903dceae32b0d69d361c2be5b4fc093 Mon Sep 17 00:00:00 2001 From: Vishal Date: Sat, 20 Apr 2024 23:58:46 +0530 Subject: [PATCH 4/4] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c6817a..b76a70a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## Plugin Manager (dd-mm-yyyy) +### 1.0.12 (20-04-2024) + +- Limited the "x new plugins are available" screen message to only show maximum 3 plugins. + ### 1.0.11 (20-04-2024) - Fixed positions of a few buttons.