Update __init__.py

修复按比例的bug
This commit is contained in:
wangpengfei 2023-09-05 22:35:39 +08:00 committed by GitHub
parent 4902d5ebed
commit 84a2db2247
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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':