feat: dev-5.1 分支基线(v1.3.35 发版后代码 + 5.1 声道改造文档)
- 以 main(ccc65af) 为基线提交当前工作区代码
- 新增 5.1 声道改造文档两份
- .gitignore 补充 .vscode/、.screenshots/
This commit is contained in:
39
test/voice_helper/search.sh
Normal file
39
test/voice_helper/search.sh
Normal file
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env bash
|
||||
# search.sh - 语音搜索测试
|
||||
# 用法: search.sh <filmName> [actorName] [directorName] [category] [unionStyle] [region] [releaseDate]
|
||||
# 示例: search.sh "流浪地球"
|
||||
# search.sh "流浪地球" "吴京"
|
||||
|
||||
set -e
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
# shellcheck disable=SC1091
|
||||
source "${SCRIPT_DIR}/lib/common.sh"
|
||||
|
||||
require_adb
|
||||
check_receiver_exists
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
log_err "至少需要一个搜索关键词"
|
||||
echo "用法: $0 <filmName> [actorName] [directorName] [category] [unionStyle] [region] [releaseDate]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 按协议 §6.1 SEARCH payload 字段顺序做位置映射
|
||||
KEYS=(filmName actorName directorName category unionStyle region releaseDate)
|
||||
|
||||
print_header "语音搜索 SEARCH"
|
||||
|
||||
ARGS=()
|
||||
for i in $(seq 1 $#); do
|
||||
idx=$((i - 1))
|
||||
if [ $idx -lt ${#KEYS[@]} ]; then
|
||||
val="${!i}"
|
||||
if [ -n "${val}" ]; then
|
||||
ARGS+=("${KEYS[$idx]}=${val}")
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
PAYLOAD=$(build_search_payload "${ARGS[@]}")
|
||||
send_voice_broadcast "SEARCH" "${PAYLOAD}"
|
||||
log_ok "预期进入 SearchActivity 并自动搜索,焦点落首张结果卡片"
|
||||
Reference in New Issue
Block a user