fix Cloudflare IP优选 v1.4 修复立即运行一次

This commit is contained in:
thsrite
2024-06-17 21:19:15 +08:00
parent 132a125f7a
commit e27fbff941
2 changed files with 5 additions and 4 deletions

View File

@@ -32,7 +32,7 @@ class CloudflareSpeedTest(_PluginBase):
# 插件图标
plugin_icon = "cloudflare.jpg"
# 插件版本
plugin_version = "1.3"
plugin_version = "1.4"
# 插件作者
plugin_author = "thsrite"
# 作者主页
@@ -81,7 +81,7 @@ class CloudflareSpeedTest(_PluginBase):
self._notify = config.get("notify")
self._check = config.get("check")
if self.get_state() and self._onlyonce:
if (self._ipv4 or self._ipv6) and self._onlyonce:
try:
self._scheduler = BackgroundScheduler(timezone=settings.TZ)
logger.info(f"Cloudflare CDN优选服务启动立即运行一次")
@@ -318,7 +318,7 @@ class CloudflareSpeedTest(_PluginBase):
if not install_flag \
and release_version == self._version \
and not Path(
f'{self._cf_path}/{self._binary_name}').exists() \
f'{self._cf_path}/{self._binary_name}').exists() \
and not Path(f'{self._cf_path}/CloudflareST.exe').exists():
logger.warn(f"未检测到CloudflareSpeedTest本地版本重新安装")
install_flag = True