feat: AccountSwitchTask 支援繁中服客戶端

- 在 _run/select_account 將 txwy 視為與 Official 同類,套用 char model OCR
- navigate_to_start_page 認得 AccountManagerTxwy 作為登入頁入口
- SupportedClientType 將 txwy 從註解移到實際列表
This commit is contained in:
momomochi987
2026-06-01 17:08:26 +08:00
parent 22635a7b60
commit 9237dddda4
2 changed files with 6 additions and 3 deletions

View File

@@ -36,7 +36,7 @@ bool asst::AccountSwitchTask::_run()
bool equal = false;
Log.info(m_client_type);
if (m_client_type == "Official") {
if (m_client_type == "Official" || m_client_type == "txwy") {
equal = equal_current_account();
}
else if (m_client_type == "Bilibili") {
@@ -77,6 +77,9 @@ bool asst::AccountSwitchTask::navigate_to_start_page()
else if (last_name == "AccountManagerBili") {
return true;
}
else if (last_name == "AccountManagerTxwy") {
return true;
}
return false;
}
@@ -148,7 +151,7 @@ bool asst::AccountSwitchTask::select_account()
sleep(200);
auto raw_img = ctrler()->get_image();
OCRer ocr(ctrler()->get_image());
if (m_client_type == "Official") {
if (m_client_type == "Official" || m_client_type == "txwy") {
ocr.set_use_char_model(true);
}
else if (m_client_type == "Bilibili") {

View File

@@ -36,6 +36,6 @@ private:
std::string m_target_account;
std::string m_client_type; // 客户端类型
const std::vector<std::string>
SupportedClientType = { "Official", "Bilibili" /*, "YoStarEN", "YoStarJP", "YoStarKR", "txwy" */ };
SupportedClientType = { "Official", "Bilibili", "txwy" /*, "YoStarEN", "YoStarJP", "YoStarKR" */ };
};
}