From 5af504e9ca6462d139c574d9bbe9adcce71e2e90 Mon Sep 17 00:00:00 2001 From: Vishal Date: Mon, 29 Apr 2024 03:22:29 +0530 Subject: [PATCH] Fixing a few mistakes --- index.json | 7 +------ plugin_manager.py | 14 +++++++------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/index.json b/index.json index 38e6fee..4871597 100644 --- a/index.json +++ b/index.json @@ -1,12 +1,7 @@ { "plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py", "versions": { - "1.0.18": { - "api_version": 8, - "commit_sha": "9936e76", - "released_on": "28-04-2024", - "md5sum": "9c5ad1c455c1e8388d19d803c9120d41" - }, + "1.0.18": null, "1.0.17": { "api_version": 8, "commit_sha": "02530f0", diff --git a/plugin_manager.py b/plugin_manager.py index 9fcab95..1e51970 100644 --- a/plugin_manager.py +++ b/plugin_manager.py @@ -1407,14 +1407,14 @@ class PluginManager: self._changelog_setup_in_progress = not bool(self._changelog) try: full_changelog = await self.get_changelog() + pattern = rf"### {version} \(\d\d-\d\d-\d{{4}}\)\n(.*?)(?=### \d+\.\d+\.\d+|\Z)" + matches = re.findall(pattern, full_changelog, re.DOTALL) + if matches: + changelog = matches[0].strip() + else: + changelog = f"Changelog entry for version {version} not found." except urllib.error.URLError: - full_changelog = 'Could not get ChangeLog due to Internet Issues' - pattern = rf"### {version} \(\d\d-\d\d-\d{{4}}\)\n(.*?)(?=### \d+\.\d+\.\d+|\Z)" - matches = re.findall(pattern, full_changelog, re.DOTALL) - if matches: - changelog = matches[0].strip() - else: - changelog = f"Changelog entry for version {version} not found." + changelog = 'Could not get ChangeLog due to Internet Issues.' self.set_changelog_global_cache(changelog) self._changelog_setup_in_progress = False