diff --git a/module/download_stat.py b/module/download_stat.py index a48a66e..40384d2 100644 --- a/module/download_stat.py +++ b/module/download_stat.py @@ -59,6 +59,9 @@ def get_download_result() -> dict: def get_total_download_speed() -> int: """get total download speed""" + # 超过 2 秒没有新数据,视为速度为 0(防止旧速度值残留显示) + if time.time() - _last_download_time > 2.0: + return 0 return _total_download_speed