From 3bc639bcabbd587b4a03d1193d83df229880adcf Mon Sep 17 00:00:00 2001 From: thsrite Date: Thu, 31 Aug 2023 19:08:50 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=92=AD=E6=94=BE=E9=99=90=E9=80=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/plugins/speedlimiter/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/plugins/speedlimiter/__init__.py b/app/plugins/speedlimiter/__init__.py index 0069352c..874b7f27 100644 --- a/app/plugins/speedlimiter/__init__.py +++ b/app/plugins/speedlimiter/__init__.py @@ -54,7 +54,7 @@ class SpeedLimiter(_PluginBase): _bandwidth: float = 0 _allocation_ratio: str = "" _auto_limit: bool = False - _limit_enabled: bool = True + _limit_enabled: bool = False # 不限速地址 _unlimited_ips = {"ipv4": "0.0.0.0/0", "ipv6": "::/0"} # 当前限速状态 @@ -76,6 +76,9 @@ class SpeedLimiter(_PluginBase): self._auto_limit = True except Exception: self._bandwidth = 0 + + # 限速服务开关 + self._limit_enabled = True if self._play_up_speed or self._play_down_speed or self._auto_limit else False self._allocation_ratio = config.get("allocation_ratio") or "" # 不限速地址 self._unlimited_ips["ipv4"] = config.get("ipv4") or "0.0.0.0/0"