mirror of
https://github.com/RubyMetric/chsrc.git
synced 2025-03-10 20:45:18 +08:00
parent
722de55ecb
commit
fd762f9d3c
@ -19,7 +19,7 @@
|
|||||||
* | czyt <czyt.go@gmail.com>
|
* | czyt <czyt.go@gmail.com>
|
||||||
* |
|
* |
|
||||||
* Created On : <2023-08-28>
|
* Created On : <2023-08-28>
|
||||||
* Last Modified : <2024-11-21>
|
* Last Modified : <2024-11-22>
|
||||||
*
|
*
|
||||||
* chsrc: Change Source —— 全平台通用命令行换源工具
|
* chsrc: Change Source —— 全平台通用命令行换源工具
|
||||||
* ------------------------------------------------------------*/
|
* ------------------------------------------------------------*/
|
||||||
@ -660,10 +660,10 @@ main (int argc, char const *argv[])
|
|||||||
|
|
||||||
if (CliOpt_DryRun)
|
if (CliOpt_DryRun)
|
||||||
{
|
{
|
||||||
char *dry_msg = CliOpt_InEnglish ? "**Enable [Dry Run] mode. " \
|
char *dry_msg = CliOpt_InEnglish ? "Enable [Dry Run] mode. " \
|
||||||
"Simulate the source changing process (skipping speed measurement). " \
|
"Simulate the source changing process (skipping speed measurement). " \
|
||||||
"Commands only print but don't run**\n"
|
"Commands only print but don't run\n"
|
||||||
: "**开启Dry Run模式,模拟换源过程(跳过测速),命令仅打印并不运行**\n";
|
: "开启Dry Run模式,模拟换源过程(跳过测速),命令仅打印并不运行\n";
|
||||||
chsrc_log (bdyellow(dry_msg));
|
chsrc_log (bdyellow(dry_msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -672,9 +672,9 @@ measure_speed_for_every_source (Source_t sources[], int size, double speed_recor
|
|||||||
int
|
int
|
||||||
select_mirror_autoly (Source_t *sources, size_t size, const char *target_name)
|
select_mirror_autoly (Source_t *sources, size_t size, const char *target_name)
|
||||||
{
|
{
|
||||||
|
if (!CliOpt_DryRun)
|
||||||
{
|
{
|
||||||
char *msg = CliOpt_InEnglish ? "Measuring speed in sequence" : "测速中";
|
char *msg = CliOpt_InEnglish ? "Measuring speed in sequence" : "测速中";
|
||||||
|
|
||||||
xy_log_brkt (App_Name, bdpurple (CliOpt_InEnglish ? "MEASURE" : "测速"), msg);
|
xy_log_brkt (App_Name, bdpurple (CliOpt_InEnglish ? "MEASURE" : "测速"), msg);
|
||||||
br();
|
br();
|
||||||
}
|
}
|
||||||
@ -689,7 +689,11 @@ select_mirror_autoly (Source_t *sources, size_t size, const char *target_name)
|
|||||||
|
|
||||||
if (CliOpt_DryRun)
|
if (CliOpt_DryRun)
|
||||||
{
|
{
|
||||||
return 1; // Dry Run 时,跳过测速
|
/* Dry Run 时,跳过测速 */
|
||||||
|
if (ProgMode_CMD_Reset)
|
||||||
|
return 0; /* 选择默认源 */
|
||||||
|
else
|
||||||
|
return 1; /* 原则第一个源 */
|
||||||
}
|
}
|
||||||
|
|
||||||
bool only_one = false;
|
bool only_one = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user