perf: 使用 devices 判断是否需要连接 (#10606)

* perf: 使用 devices 判断是否需要连接

* chore: 判断是否存在捕获组
This commit is contained in:
uye
2024-09-14 14:29:01 +08:00
committed by GitHub
parent ee5ea06b17
commit a877a3b14b
4 changed files with 51 additions and 14 deletions

View File

@@ -83,6 +83,8 @@ bool asst::GeneralConfig::parse(const json::value& json)
const AdbCfg& base_cfg = base_name.empty() ? AdbCfg() : m_adb_cfg.at(base_name);
AdbCfg& adb = m_adb_cfg[cfg_json.at("configName").as_string()];
adb.devices = cfg_json.get("devices", base_cfg.devices);
adb.address_regex = cfg_json.get("addressRegex", base_cfg.address_regex);
adb.connect = cfg_json.get("connect", base_cfg.connect);
adb.display_id = cfg_json.get("displayId", base_cfg.display_id);
adb.uuid = cfg_json.get("uuid", base_cfg.uuid);