mirror of
https://github.com/MetaCubeX/subconverter.git
synced 2025-11-04 18:19:42 +08:00
Enhancements
Refresh cron schedule after loading TOML preferences (#629). Keep line order of Plugin section in Loon configs.
This commit is contained in:
parent
c3e8e88fb6
commit
3cb07c3325
@ -1768,6 +1768,7 @@ std::string proxyToLoon(std::vector<Proxy> &nodes, const std::string &base_conf,
|
||||
string_array remarks_list;
|
||||
|
||||
ini.store_any_line = true;
|
||||
ini.add_direct_save_section("Plugin");
|
||||
if(ini.parse(base_conf) != INIREADER_EXCEPTION_NONE && !ext.nodelist)
|
||||
{
|
||||
writeLog(0, "Loon base loader failed with error: " + ini.get_last_error(), LOG_LEVEL_ERROR);
|
||||
|
||||
@ -718,6 +718,7 @@ void readTOMLConf(toml::value &root)
|
||||
auto tasks = toml::find_or<std::vector<toml::value>>(root, "tasks", {});
|
||||
importItems(tasks, "tasks", false);
|
||||
global.cronTasks = toml::get<CronTaskConfigs>(toml::value(tasks));
|
||||
refresh_schedule();
|
||||
|
||||
const auto §ion_server = toml::find(root, "server");
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user