From a392fddd3afa0d9d08852f27f32c592426d97b49 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Mon, 21 Jul 2025 21:13:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=B8=8B=E8=BD=BD=E9=80=9F=E5=BA=A6=E4=B8=8B?= =?UTF-8?q?=E9=99=90=E6=9D=A1=E4=BB=B6=E6=97=B6=E8=BE=93=E5=87=BA=E6=B5=8B?= =?UTF-8?q?=E9=80=9F=E7=BB=93=E6=9E=9C=E6=95=B0=E9=87=8F=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- task/download.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/task/download.go b/task/download.go index 6a9854c..9e8ade5 100644 --- a/task/download.go +++ b/task/download.go @@ -89,7 +89,9 @@ func TestDownloadSpeed(ipSet utils.PingDelaySet) (speedSet utils.DownloadSpeedSe } } bar.Done() - if utils.Debug && len(speedSet) == 0 { // 调试模式下,没有满足速度限制的数据,返回所有测速数据供用户查看当前的测速结果,以便适当调低预期测速条件 + if MinSpeed == 0.00 { // 如果没有设置下载速度下限,则直接返回所有测速数据 + speedSet = utils.DownloadSpeedSet(ipSet) + } else if utils.Debug && len(speedSet) == 0 { // 如果设置了下载速度下限,且是调试模式下,且没有找到任何一个满足条件的 IP 时,返回所有测速数据,供用户查看当前的测速结果,以便适当调低预期测速条件 fmt.Println("\033[33m[调试] 没有满足 下载速度下限 条件的 IP,忽略条件返回所有测速数据(方便下次测速时调整条件)。\033[0m") speedSet = utils.DownloadSpeedSet(ipSet) }