mirror of
https://github.com/d0zingcat/MoviePilot-Plugins.git
synced 2026-05-14 07:26:51 +00:00
fix:修复-比特率为负数时,限速失败的情况
This commit is contained in:
@@ -539,7 +539,8 @@ class SpeedLimiter(_PluginBase):
|
||||
"""
|
||||
计算智能上传限速
|
||||
"""
|
||||
if not self._bandwidth:
|
||||
# 当前总比特率大于总带宽,则设置为最低限速
|
||||
if not self._bandwidth or total_bit_rate > self._bandwidth:
|
||||
return 10
|
||||
return round((self._bandwidth - total_bit_rate) / 8 / 1024, 2)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user