mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-06-03 22:50:01 +08:00
feat: add plugin system version compatibility checks
This commit is contained in:
@@ -251,6 +251,12 @@ async def install(
|
||||
# 首先检查插件是否已经存在,并且是否强制安装,否则只进行安装统计
|
||||
plugin_helper = PluginHelper()
|
||||
if not force and plugin_id in PluginManager().get_plugin_ids():
|
||||
if repo_url:
|
||||
compatible_message = await plugin_helper.async_get_plugin_system_version_check_message(
|
||||
plugin_id, repo_url
|
||||
)
|
||||
if compatible_message:
|
||||
return schemas.Response(success=False, message=compatible_message)
|
||||
await plugin_helper.async_install_reg(pid=plugin_id, repo_url=repo_url)
|
||||
else:
|
||||
# 插件不存在或需要强制安装,下载安装并注册插件
|
||||
|
||||
Reference in New Issue
Block a user