mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-05-06 20:42:43 +08:00
refactor(plugin): rename local repo paths setting
This commit is contained in:
@@ -418,7 +418,7 @@ class ConfigModel(BaseModel):
|
||||
# 是否开启插件热加载
|
||||
PLUGIN_AUTO_RELOAD: bool = False
|
||||
# 本地插件仓库目录,多个地址使用,分隔
|
||||
PLUGIN_LOCAL_PATHS: Optional[str] = None
|
||||
PLUGIN_LOCAL_REPO_PATHS: Optional[str] = None
|
||||
|
||||
# ==================== Github & PIP ====================
|
||||
# Github token,提高请求api限流阈值 ghp_****
|
||||
|
||||
@@ -39,7 +39,7 @@ from app.utils.system import SystemUtils
|
||||
|
||||
class PluginManager(ConfigReloadMixin, metaclass=Singleton):
|
||||
"""插件管理器"""
|
||||
CONFIG_WATCH = {"DEV", "PLUGIN_AUTO_RELOAD", "PLUGIN_LOCAL_PATHS"}
|
||||
CONFIG_WATCH = {"DEV", "PLUGIN_AUTO_RELOAD", "PLUGIN_LOCAL_REPO_PATHS"}
|
||||
|
||||
def __init__(self):
|
||||
# 插件列表
|
||||
|
||||
@@ -80,10 +80,10 @@ class PluginHelper(metaclass=WeakSingleton):
|
||||
"""
|
||||
获取本地插件来源目录列表。
|
||||
"""
|
||||
if not settings.PLUGIN_LOCAL_PATHS:
|
||||
if not settings.PLUGIN_LOCAL_REPO_PATHS:
|
||||
return []
|
||||
paths = []
|
||||
for item in settings.PLUGIN_LOCAL_PATHS.split(","):
|
||||
for item in settings.PLUGIN_LOCAL_REPO_PATHS.split(","):
|
||||
local_path = item.strip()
|
||||
if not local_path:
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user