Support get reset ls for Flathub

[GitHub #191]
This commit is contained in:
Aoran Zeng 2025-05-27 18:33:18 +08:00
parent 283acfa4ba
commit 61a049b776
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98

View File

@ -45,6 +45,17 @@ static Source_t wr_flathub_sources[] =
def_sources_n(wr_flathub);
/**
* chsrc get flathub
*/
void
wr_flathub_getsrc (char *option)
{
chsrc_run ("flatpak remotes", RunOpt_Default);
chsrc_run ("flatpak remote-info flathub", RunOpt_Default);
}
/**
* @consult https://mirrors.sjtug.sjtu.edu.cn/docs/flathub
*/
@ -73,20 +84,35 @@ wr_flathub_setsrc (char *option)
}
/**
* chsrc reset flathub
*/
void
wr_flathub_resetsrc (char *option)
{
wr_flathub_setsrc (option);
}
/**
* chsrc ls flathub
*/
Feature_t
wr_flathub_feat (char *option)
{
Feature_t f = {0};
f.can_get = false;
f.can_reset = false;
f.can_get = true;
f.can_reset = true;
f.cap_locally = CanNot;
f.cap_locally_explain = NULL;
f.can_english = false;
f.can_user_define = true;
f.note = "对Flathub目标进行测速的文件非常小测速效果严重失真若您知道可供测速的URL欢迎参与贡献: chsrc issue";
return f;
}
def_target_sf (wr_flathub);
def_target_gsrf (wr_flathub);