Skip to content

Commit dce39ed

Browse files
committed
Fix accurate info
1 parent 291fd3c commit dce39ed

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

src/framework/core.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ measure_speed_for_every_source (Source_t sources[], int size, double speed_recor
732732
{
733733
/* 防止维护者没填,这里有一些脏数据,我们软处理:假装该链接URL不存在 */
734734
has_dedicated_speed_url = false;
735-
chsrc_debug ("m", xy_2strjoin ("专用测速链接为脏数据,请修复: ", provider.name));
735+
chsrc_debug ("m", xy_2strjoin ("专用测速链接为脏数据,请修复: ", provider->name));
736736
}
737737
}
738738

@@ -780,7 +780,16 @@ measure_speed_for_every_source (Source_t sources[], int size, double speed_recor
780780
{
781781
const char *msg = ENGLISH ? provider->abbr : provider->name;
782782

783-
bool is_accurate = provider->psmi.accurate;
783+
bool is_accurate = false;
784+
if (has_dedicated_speed_url)
785+
{
786+
is_accurate = true;
787+
}
788+
else if (provider->psmi.accurate)
789+
{
790+
is_accurate = true;
791+
}
792+
784793
char *accurate_msg = CHINESE ? (is_accurate ? bdblue(faint("[精准测速]")) : faint("[模糊测速]"))
785794
: (is_accurate ? bdblue(faint("[accurate]")) : faint("[rough]"));
786795

src/framework/struct.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@ typedef struct Source_t
7474
}
7575
Source_t;
7676

77+
/* 不用给专用测速链接,因为 Upstream 的整体测速链接已是精准测速 */
78+
#define DelegateToUpstream NULL
79+
/* 不用给专用测速链接,因为该镜像站是专用镜像站,其整体测速链接已是精准测速 */
80+
#define DelegateToMirror NULL
81+
/* 看到该注释的贡献者,你可以帮忙寻找专用测速链接 */
82+
#define NeedContribute NULL
83+
7784
#define def_sources_n(t) const size_t t##_sources_n = xy_arylen(t##_sources)
7885

7986

0 commit comments

Comments
 (0)