From dce39ed6c8c2bffc921d96226716f4f4aa6b4a4e Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Fri, 11 Jul 2025 17:57:37 +0800 Subject: [PATCH] Fix accurate info --- src/framework/core.c | 13 +++++++++++-- src/framework/struct.h | 7 +++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/framework/core.c b/src/framework/core.c index 3f8aff1..be7d45e 100644 --- a/src/framework/core.c +++ b/src/framework/core.c @@ -732,7 +732,7 @@ measure_speed_for_every_source (Source_t sources[], int size, double speed_recor { /* 防止维护者没填,这里有一些脏数据,我们软处理:假装该链接URL不存在 */ has_dedicated_speed_url = false; - chsrc_debug ("m", xy_2strjoin ("专用测速链接为脏数据,请修复: ", provider.name)); + chsrc_debug ("m", xy_2strjoin ("专用测速链接为脏数据,请修复: ", provider->name)); } } @@ -780,7 +780,16 @@ measure_speed_for_every_source (Source_t sources[], int size, double speed_recor { const char *msg = ENGLISH ? provider->abbr : provider->name; - bool is_accurate = provider->psmi.accurate; + bool is_accurate = false; + if (has_dedicated_speed_url) + { + is_accurate = true; + } + else if (provider->psmi.accurate) + { + is_accurate = true; + } + char *accurate_msg = CHINESE ? (is_accurate ? bdblue(faint("[精准测速]")) : faint("[模糊测速]")) : (is_accurate ? bdblue(faint("[accurate]")) : faint("[rough]")); diff --git a/src/framework/struct.h b/src/framework/struct.h index 3405d50..f802944 100644 --- a/src/framework/struct.h +++ b/src/framework/struct.h @@ -74,6 +74,13 @@ typedef struct Source_t } Source_t; +/* 不用给专用测速链接,因为 Upstream 的整体测速链接已是精准测速 */ +#define DelegateToUpstream NULL +/* 不用给专用测速链接,因为该镜像站是专用镜像站,其整体测速链接已是精准测速 */ +#define DelegateToMirror NULL +/* 看到该注释的贡献者,你可以帮忙寻找专用测速链接 */ +#define NeedContribute NULL + #define def_sources_n(t) const size_t t##_sources_n = xy_arylen(t##_sources)