mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 15:38:19 +08:00
refactor: centralize MoviePilot server helper
This commit is contained in:
@@ -5,8 +5,8 @@ from fastapi import FastAPI
|
||||
|
||||
from app.chain.system import SystemChain
|
||||
from app.core.config import global_vars
|
||||
from app.helper.server import MoviePilotServerHelper
|
||||
from app.helper.system import SystemHelper
|
||||
from app.helper.usage import UsageHelper
|
||||
from app.startup.command_initializer import init_command, stop_command, restart_command
|
||||
from app.startup.modules_initializer import init_modules, stop_modules
|
||||
from app.startup.monitor_initializer import stop_monitor, init_monitor
|
||||
@@ -31,7 +31,7 @@ async def init_extra():
|
||||
# 重启完成
|
||||
SystemChain().restart_finish()
|
||||
# 上报当前安装版本
|
||||
await UsageHelper().async_report()
|
||||
await MoviePilotServerHelper.async_report_usage()
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
|
||||
@@ -21,7 +21,7 @@ from app.helper.display import DisplayHelper
|
||||
from app.helper.doh import DohHelper
|
||||
from app.helper.resource import ResourceHelper
|
||||
from app.helper.message import MessageHelper, stop_message
|
||||
from app.helper.subscribe import SubscribeHelper
|
||||
from app.helper.server import MoviePilotServerHelper
|
||||
from app.db import close_database
|
||||
from app.db.systemconfig_oper import SystemConfigOper
|
||||
from app.command import CommandChain
|
||||
@@ -152,8 +152,11 @@ def init_modules():
|
||||
ModuleManager()
|
||||
# 启动事件消费
|
||||
EventManager().start()
|
||||
# 初始化订阅分享
|
||||
SubscribeHelper()
|
||||
# 初始化共享服务端状态
|
||||
MoviePilotServerHelper.init_plugin_report()
|
||||
MoviePilotServerHelper.init_subscribe_report()
|
||||
MoviePilotServerHelper.get_user_uuid()
|
||||
MoviePilotServerHelper.get_github_user()
|
||||
# 初始化AI智能体
|
||||
init_agent()
|
||||
# 启动前端服务
|
||||
|
||||
Reference in New Issue
Block a user