From 84a2db2247f92d9cb99f87b4a0400d6c60a45f29 Mon Sep 17 00:00:00 2001 From: wangpengfei <41565284+WPF0414@users.noreply.github.com> Date: Tue, 5 Sep 2023 22:35:39 +0800 Subject: [PATCH] Update __init__.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复按比例的bug --- app/plugins/speedlimiter/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/plugins/speedlimiter/__init__.py b/app/plugins/speedlimiter/__init__.py index fafce52e..5d8e4a46 100644 --- a/app/plugins/speedlimiter/__init__.py +++ b/app/plugins/speedlimiter/__init__.py @@ -517,7 +517,7 @@ class SpeedLimiter(_PluginBase): else: # 按比例 allocation_count = sum([int(i) for i in self._allocation_ratio.split(":")]) - upload_limit = int(upload_limit * int(self._allocation_ratio[cnt]) / allocation_count) + upload_limit = int(upload_limit * int(self._allocation_ratio.split(":")[cnt]) / allocation_count) cnt += 1 if str(download) == 'qbittorrent':