Fix accurate info

This commit is contained in:
Aoran Zeng 2025-07-11 17:57:37 +08:00
parent 291fd3cfc9
commit dce39ed6c8
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
2 changed files with 18 additions and 2 deletions

View File

@ -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]"));

View File

@ -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)