diff --git a/astrbot/core/star/updator.py b/astrbot/core/star/updator.py index 14cb5331a..9896115bb 100644 --- a/astrbot/core/star/updator.py +++ b/astrbot/core/star/updator.py @@ -32,10 +32,6 @@ class PluginUpdator(RepoZipUpdator): if not repo_url: raise Exception(f"插件 {plugin.name} 没有指定仓库地址。") - if proxy: - proxy = proxy.removesuffix("/") - repo_url = f"{proxy}/{repo_url}" - plugin_path = os.path.join(self.plugin_store_path, plugin.root_dir_name) logger.info(f"正在更新插件,路径: {plugin_path},仓库地址: {repo_url}") diff --git a/astrbot/core/zip_updator.py b/astrbot/core/zip_updator.py index 2d2b7b834..a09342795 100644 --- a/astrbot/core/zip_updator.py +++ b/astrbot/core/zip_updator.py @@ -148,6 +148,7 @@ class RepoZipUpdator: release_url = releases[0]["zipball_url"] if proxy: + proxy = proxy.rstrip("/") release_url = f"{proxy}/{release_url}" logger.info( f"检查到设置了镜像站,将使用镜像站下载 {author}/{repo} 仓库源码: {release_url}"