mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 23:47:41 +08:00
refactor(plugin): rename local repo paths setting
This commit is contained in:
+1
-1
@@ -418,7 +418,7 @@ class ConfigModel(BaseModel):
|
|||||||
# 是否开启插件热加载
|
# 是否开启插件热加载
|
||||||
PLUGIN_AUTO_RELOAD: bool = False
|
PLUGIN_AUTO_RELOAD: bool = False
|
||||||
# 本地插件仓库目录,多个地址使用,分隔
|
# 本地插件仓库目录,多个地址使用,分隔
|
||||||
PLUGIN_LOCAL_PATHS: Optional[str] = None
|
PLUGIN_LOCAL_REPO_PATHS: Optional[str] = None
|
||||||
|
|
||||||
# ==================== Github & PIP ====================
|
# ==================== Github & PIP ====================
|
||||||
# Github token,提高请求api限流阈值 ghp_****
|
# Github token,提高请求api限流阈值 ghp_****
|
||||||
|
|||||||
+1
-1
@@ -39,7 +39,7 @@ from app.utils.system import SystemUtils
|
|||||||
|
|
||||||
class PluginManager(ConfigReloadMixin, metaclass=Singleton):
|
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):
|
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 []
|
return []
|
||||||
paths = []
|
paths = []
|
||||||
for item in settings.PLUGIN_LOCAL_PATHS.split(","):
|
for item in settings.PLUGIN_LOCAL_REPO_PATHS.split(","):
|
||||||
local_path = item.strip()
|
local_path = item.strip()
|
||||||
if not local_path:
|
if not local_path:
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user