mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 15:38:19 +08:00
fix restart
This commit is contained in:
@@ -12,7 +12,7 @@ from app.startup.plugins_initializer import init_plugins, stop_plugins, sync_plu
|
||||
from app.startup.routers_initializer import init_routers
|
||||
from app.startup.scheduler_initializer import stop_scheduler, init_scheduler, init_plugin_scheduler
|
||||
from app.startup.workflow_initializer import init_workflow, stop_workflow
|
||||
from app.utils.system import SystemUtils
|
||||
from app.helper.system import SystemHelper
|
||||
|
||||
|
||||
async def init_extra():
|
||||
@@ -25,7 +25,7 @@ async def init_extra():
|
||||
# 重新注册命令
|
||||
restart_command()
|
||||
# 设置系统已修改标志
|
||||
SystemUtils.set_system_modified()
|
||||
SystemHelper().set_system_modified()
|
||||
# 重启完成
|
||||
SystemChain().restart_finish()
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ from app.core.config import settings
|
||||
from app.core.plugin import PluginManager
|
||||
from app.log import logger
|
||||
from app.utils.system import SystemUtils
|
||||
from app.helper.system import SystemHelper
|
||||
|
||||
|
||||
async def sync_plugins() -> bool:
|
||||
@@ -147,8 +148,8 @@ def restore_plugins():
|
||||
return
|
||||
|
||||
# 系统被重置才恢复插件
|
||||
if SystemUtils.is_system_reset():
|
||||
|
||||
if SystemHelper().is_system_reset():
|
||||
|
||||
# 确保插件目录存在
|
||||
plugins_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user