This commit is contained in:
thsrite 2023-10-17 16:54:00 +08:00
parent 6868712b4e
commit b90622a88e
2 changed files with 5 additions and 2 deletions

View File

@ -45,6 +45,9 @@ class SystemChain(ChainBase):
""" """
重启系统 重启系统
""" """
if SystemUtils.is_windows():
logger.error("windows暂不支持")
return
if channel and userid: if channel and userid:
self.post_message(Notification(channel=channel, self.post_message(Notification(channel=channel,
title="系统正在更新,请耐心等候!", userid=userid)) title="系统正在更新,请耐心等候!", userid=userid))

View File

@ -80,7 +80,7 @@ class MoviePilotUpdateNotify(_PluginBase):
return return
# 本地版本 # 本地版本
local_version = SystemChain().get_local_version() local_version = SystemChain(self.db).get_local_version()
if release_version == local_version: if release_version == local_version:
logger.info(f"当前版本:{local_version} 远程版本:{release_version} 停止运行") logger.info(f"当前版本:{local_version} 远程版本:{release_version} 停止运行")
return return
@ -98,7 +98,7 @@ class MoviePilotUpdateNotify(_PluginBase):
# 自动更新 # 自动更新
if self._update: if self._update:
logger.info("开始执行自动更新…") logger.info("开始执行自动更新…")
SystemChain().update() SystemChain(self.db).update()
@staticmethod @staticmethod
def __get_release_version(): def __get_release_version():