From 4d6bf56fa000342bfe03320476f3941dff98c5cd Mon Sep 17 00:00:00 2001 From: jxxghp Date: Tue, 21 Nov 2023 21:44:50 +0800 Subject: [PATCH] fix bug --- README.md | 2 +- app/core/config.py | 2 +- app/helper/plugin.py | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 774c6050..52d37520 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ MoviePilot需要配套下载器和媒体服务器配合使用。 - **AUTO_DOWNLOAD_USER:** 远程交互搜索时自动择优下载的用户ID(消息通知渠道的用户ID),多个用户使用,分割,未设置需要选择资源或者回复`0` --- - **OCR_HOST:** OCR识别服务器地址,格式:`http(s)://ip:port`,用于识别站点验证码实现自动登录获取Cookie等,不配置默认使用内建服务器`https://movie-pilot.org`,可使用 [这个镜像](https://hub.docker.com/r/jxxghp/moviepilot-ocr) 自行搭建。 -- **PLUGIN_MARKET:** 插件市场仓库地址,仅支持Github仓库,`main`分支,多个地址使用`,`分隔,保留最后的/,默认为官方插件仓库:`https://github.com/jxxghp/MoviePilot-Plugins/ `。 +- **PLUGIN_MARKET:** 插件市场仓库地址,仅支持Github仓库`main`分支,多个地址使用`,`分隔,默认为官方插件仓库:`https://github.com/jxxghp/MoviePilot-Plugins`。 - **GITHUB_TOKEN:** Github token,提高请求api限流阈值 ghp_****(仅支持环境变量配置) --- - **❗MESSAGER:** 消息通知渠道,支持 `telegram`/`wechat`/`slack`/`synologychat`,开启多个渠道时使用`,`分隔。同时还需要配置对应渠道的环境变量,非对应渠道的变量可删除,推荐使用`telegram` diff --git a/app/core/config.py b/app/core/config.py index a3c8fcfe..80c2ba53 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -211,7 +211,7 @@ class Settings(BaseSettings): # 大内存模式 BIG_MEMORY_MODE: bool = False # 插件市场仓库地址,多个地址使用,分隔,地址以/结尾 - PLUGIN_MARKET: str = "https://github.com/jxxghp/MoviePilot-Plugins/" + PLUGIN_MARKET: str = "https://github.com/jxxghp/MoviePilot-Plugins" # Github token,提高请求api限流阈值 ghp_**** GITHUB_TOKEN: str = None # 自动检查和更新站点资源包(站点索引、认证等) diff --git a/app/helper/plugin.py b/app/helper/plugin.py index baf102db..f22dd1f6 100644 --- a/app/helper/plugin.py +++ b/app/helper/plugin.py @@ -44,8 +44,12 @@ class PluginHelper(metaclass=Singleton): """ if not repo_url: return None, None + if not repo_url.endswith("/"): + repo_url += "/" + if repo_url.count("/") < 6: + repo_url = f"{repo_url}main/" try: - user, repo = repo_url.split("/")[-3:-1] + user, repo = repo_url.split("/")[-4:-2] except Exception as e: print(str(e)) return None, None